目前已经了解hibernate一级缓存基于session的,二级缓存基于sessionFactory的可以配置是否启用。两者提供的方法也是差不多,有查询会先找一级缓存,再找二级缓存,之后去数据库。好像有些项目是用了hibernate的缓存,为什么还要使用ehcache缓存技术?
学习是最好的投资!
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.
hibernate's second-level cache only needs to implement its interface, and you can customize it.
ehcache is one of the implementation solutions of hibernate second-level cache
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.
hibernate's second-level cache only needs to implement its interface, and you can customize it.
ehcache is one of the implementation solutions of hibernate second-level cache