Ehcache缓存模式
缓存有多种不同的缓存模式。以下是Ehcache支持的缓存模式:
· 直接操作(direct manipulation)
· 推送模式(pull-through)
· 自填充(self-populating)
直接操作(direct manipulation) |
你可以通过方法cache.put(Elemtn element)来存储对象,通过方法cache.get(Ojbect key)来取得对象。
只需要使用cache.get(Ojbect key)来取得对象。Cache自动去构建实体。
转自:http://blog.csdn.net/mgoann/article/details/4086641