amit attri wrote:Q1 The third party application is updating data using Hibernate only. I can even modify code in third party app.
Can both cahe (of third party and my app) synchronize their data ? If yes, How can I do that ?
You could configure your second level cache as "read - write". If the request is going via hibernate itself, the cache should synchronize the changes automatically.
Read-Write Details
However by relying on cached entities, you risk having an out-of-sync cache when an update happens in the database via a different request, so ensure all requests go via hibernate itself.
amit attri wrote:Q2 In case I use second level cache as you suggested.... I read about it that it makes very frequent invalidation. And also if data of one table is changed, then entire cache is refreshed. Is it true ?
force eh cache