go4it

just do it

Ehcache学习(四)缓存模式

简介 http://blog.csdn.net/mgoann/archive/2009/04/17/4086641.aspx

缓存有多种不同的缓存模式。以下是Ehcache支持的缓存模式:

· 直接操作(direct manipulation)

· 推送模式(pull-through)

· 自填充(self-populating)

直接操作(direct manipulation

你可以通过方法cache.put(Elemtn element)来存储对象,通过方法cache.get(Ojbect key)来取得对象。

自填充(self-populating

只需要使用cache.get(Ojbect key)来取得对象。Cache自动去构建实体。

posted on 2009-07-09 10:59  cxccbv  阅读(642)  评论(0)    收藏  举报

导航