admin管理员组文章数量:1208155
We are currently using Hibernate Second-Level Cache (READ_WRITE) to cache our database queries. However, we have the problem that asynchronous updates of the database (by another application of ours) do not invalidate the Hibernate second-level cache. Currently we invalidate the cache "manually" via an API that calls entitymanager.getEntityManagerFactory().getCache().evictAll()
.
I know there are some older posts (>8 years) dealing with this topic, but I would be reluctant to integrate the answers suggested there (e.g. with UDFs) into our applications.
So are there any other (simple/easy) ways to automatically invalidate the Hibernate second-level cache when another application changes the contents of the database?
Thanks for your ideas.
本文标签: spring bootHibernate SecondLevel Cache Inconsistent after Async UpdateStack Overflow
版权声明:本文标题:spring boot - Hibernate Second-Level Cache Inconsistent after Async Update - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1738710086a2108144.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论