【发布时间】:2012-05-17 18:09:33
【问题描述】:
我正在使用带有 Hazelcast 2.1 的 Spring @Cacheable 注释和 春季 3.1。
@Cacheable("testCache")
public MyObject testMethod(int testParam);
//After method call
MyObject test = Hazelcast.getMap("testCache").get("key")
test.setSomeProp() //This line causes an update to the cache since it is reference.
是否可以从地图返回缓存值的克隆/副本,而不是从 Hazelcast.getMap() 中引用?
也就是说,我想要一个像 EhCache 中的 copyOnRead 功能。见EhCache Documentation
【问题讨论】:
标签: spring distributed-caching hazelcast