想不到自己的ehcache是1.5版 最高的都到2.4版了
发现hibernate3.3对二级缓存的实现加强了。采用新的实现
<prop key="hibernate.cache.use_second_level_cache">true</prop>
<prop key="hibernate.cache.use_query_cache">true</prop>
<prop key="hibernate.cache.region.factory_class">net.sf.ehcache.hibernate.EhCacheRegionFactory</prop>
<prop key="net.sf.ehcache.configurationResourceName">/ehcache-class.xml</prop>
ehcache的分支用到的分为2块 hibernate+web
2块应该来说没什么关系,hibernate的话spring3.1支持annotation方式更方便的使用缓存
@Cacheable(value = "findPageCache")
@CacheEvict(value = "findPageCache", allEntries = true)
这个是查询缓存么?我认为这个是方法级缓存。 至于查询缓存着可以分得更细
setCacheQueries(true);
web缓存和spring的配置让我感到很伤。
理论上:
<bean id="cacheManager" class="org.springframework.cache.ehcache.EhCacheCacheManager"
p:cacheManager-ref="ehcache" />
<bean id="ehcache"
class="org.springframework.cache.ehcache.EhCacheManagerFactoryBean"
p:config-location="classpath:ehcache-web.xml" />
就能指定web缓存的配置,而且log也显示已经加载成功了,但是
老是报:net.sf.ehcache.CacheException: cache 'XXXX' not found in configuration
如果在classpath下写一个默认的
cache.xml当然是没问题的,因为ehcache默认的就是去那个文件里面找。但是为什么配置filter会找不到cache?难道fileter没有和spring结合起来?还要再看看。
分享到:
相关推荐
EhCache
, monitorPor t=9889" /> 3.在\ehcache-monitor-kit-1.0.0\etc\ehcache-monitor.conf中可以配置监控的ip和端口号。 4.启动被监控的web application和ehcache-monitor-kit-1.0.0\bin目录下的startup.bat(在windows...
hibernate+ehcache hibernate+ehcache hibernate+ehcache hibernate+ehcache hibernate+ehcache
ehcache-3.8.1.jar
hibernate ehcache.xml 配置详解
mybatis 第三方二级缓存,ehcache 配置文件的 约束文件 ehcache.xsd !!
EhCache 是一个纯Java的进程内缓存框架,具有快速、精干等特点,是Hibernate中默认的CacheProvider。 Ehcache是一种广泛使用的开源Java分布式缓存。主要面向通用缓存,Java EE和轻量级容器。它具有内存和磁盘存储,...
spring3整合EhCache注解实例
ehcache资料(包含ehcache jar包)
ehcache所需的ehcache-core-2.5.2.jar及其源码ehcache-core-2.5.2-sources.jar
Ehcache 的一个简单demo案例 了解如何使用ehcache 以及掌握一些基本的api
包含EHCache.jar和EHCache 技术文档.pdf
EHCache_技术文档 EHCache缓存 spring缓存
ehcache学习文档 ehcache 缓存
16一级缓存、二级缓存、EhCache第三方缓存.md
Ehcache经典中文教程Ehcache内存框架介绍 —高成勇 安装 配置 编码接口介绍 api
ehcache缓存
ehcache jar包
EhCache开启gzip压缩功能
ehcache-3.4.0.jar ehcache .jar ehcache-3.4.0.jar ehcache .jar