Cache invalidation in Ehcache

后端 未结 5 1402
北恋
北恋 2020-12-19 09:03

I am using Ehcache in Hibernate.

How can I notify the cache that the database has changed? How can I invalidate the cached data? How can I programmatically achieve t

5条回答
  •  被撕碎了的回忆
    2020-12-19 09:56

    Set cache expiration so data is refreshed as or more often than the database changes .

    Also you can update in cache only elements that change in the database .

提交回复
热议问题