ehcache rmi缓存同步求教

学无止境-逆流而上 2016-11-18 11:24:21
有A、B 2台机,缓存用ehcache,rmi方式,发现缓存不同步。
比如:在A机修改了某个用户,同时更新缓存。但下次访问时,有时候返回更新前结果,有时返回更新后结果,其实就是A机修改缓存后,并没有更新到B机子。
据说是因为ehcache rmi方式的缓存同步不太靠谱,但也不至于这个明显吧。
<cacheManagerPeerProviderFactory class="net.sf.ehcache.distribution.RMICacheManagerPeerProviderFactory"
properties="peerDiscovery=manual, socketTimeoutMillis=2000, rmiUrls=//ehcache.host.other:40005/activeSessionsCache|//ehcache.host.other:40005/userCache|//ehcache.host.other:40005/sysCache|//ehcache.host.other:40005/actCache" />
<cacheManagerPeerListenerFactory class="net.sf.ehcache.distribution.RMICacheManagerPeerListenerFactory"
properties="hostName=127.0.0.1, port=40005, socketTimeoutMillis=2000"/>
...全文
537 回复 打赏 收藏 转发到动态 举报
写回复
用AI写文章
回复
切换为时间正序
请发表友善的回复…
发表回复

25,985

社区成员

发帖
与我相关
我的任务
社区描述
高性能WEB开发
社区管理员
  • 高性能WEB开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧