同一个tomcat下的两个项目之间可以共用同一片ehcache缓存么?
鸡动个蛋 2015-01-05 10:36:34 情景如下:
A项目得到一个地理位置信息 需要在B项目中保存入库并且存入缓存
现在A不想去调B的接口去实现这个功能
A想在本地保存到ehcache缓存中 使用同一个cacheName 让B直接从机器中拿到相对应的缓存信息
可是现在B拿不到A的值
请问是需要其他的配置信息么?
现有配置信息如下
A:
<ehcache>
<diskStore path="java.io.tmpdir/i5xwxplus" />
<defaultCache
maxElementsInMemory="1000"
eternal="false"
timeToIdleSeconds="120"
timeToLiveSeconds="120"
overflowToDisk="true" />
<cache
name="i5xwxplus"
maxElementsInMemory="50000"
eternal="false"
overflowToDisk="true"
timeToIdleSeconds="1800"
timeToLiveSeconds="1800"
diskPersistent="false"
memoryStoreEvictionPolicy="LFU" >
</cache>
</ehcache>
B和A一样
求大神指导!