java - hibernate有一级和二级缓存为什么还要使用ehcache缓存?
PHPz
PHPz 2017-04-18 09:36:34
0
3
686

目前已经了解hibernate一级缓存基于session的,二级缓存基于sessionFactory的可以配置是否启用。两者提供的方法也是差不多,有查询会先找一级缓存,再找二级缓存,之后去数据库。
好像有些项目是用了hibernate的缓存,为什么还要使用ehcache缓存技术?

PHPz
PHPz

学习是最好的投资!

reply all(3)
伊谢尔伦

There are many options for hibernate's second-level cache. ehcache is the default implementation. You can use other options. Just implement the CacheProvider interface.

PHPzhong

hibernate's second-level cache only needs to implement its interface, and you can customize it.

Ty80

ehcache is one of the implementation solutions of hibernate second-level cache

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template