hibernate distributed 2nd level cache options

风流意气都作罢 提交于 2019-12-06 03:22:52

I'm working with EhCache for Hibernate and for application level cache since 3 years ago. We use it with RMI for cache invalidation and it works really good. If you use the cache for replication you should take care about the object graph, it could turn very heavy with high cardinality relations.

If you use EhCache for Hibernate you could use it for Query cache (it's a good improvement for read-only tables) and it the table is modified it cleans the cache automatically. Using EhCache to cache collections is a good idea too, to avoid joins a sub-selects.

To clean the caches at time intervals you could implement a cache extension of EhCache that cleans the caches. We did it a works good.

Regards, Jonathan.

Also check out Hazelcast, Coherence and GemStone. These are distributed caching solutions with Query support. They also have ready-to-go second level cache plug-in for Hibernate. Hazelcast is open source.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!