Spring的缓存机制

Spring缓存机制中,包括两个方面的缓存操作

1.缓存某个方法返回的结果或者流

2.在某个方法执行前或后清空缓存

 

Spring的缓存机制是基于Spring的AOP,那么在
Spring Cache中应该存在着一个Advice。那就是
org.springframework.cache.Cache。

 

但spring并不是直接使用
org.springframework.cache.Cache,spring把Cache
对象交给org.springframework.cache.CacheManager
来管理。


在spring对EHCache的支持中,
org.springframework.cache.ehcache.EhCacheManag
er就是org.springframework.cache.CacheManager的
一个实现。

 

详细配置http://www.cnblogs.com/sin90lzc/archive/2012/07/14/2587227.html

posted on 2012-10-20 22:52  angelshelter  阅读(480)  评论(0编辑  收藏  举报

导航