ehcache磁盘存储可以同时安全访问吗? [英] Can ehcache diskstore be safely accessed concurrently?
问题描述
上下文:我想知道是否两个Java Servlet上下文运行相同的应用程序可以共享一个DiskStore。
答案是否定的。 您可以使用 Terracotta服务器阵列。或者,作为第二种选择,复制缓存可能适合您以及每个应用程序/实例具有它自己的本地DiskStore的地方。
I see the DiskStore location has a .lock file. I've always understood that it is difficult and sometimes impossible to make file IO atomic. So, my expectation is that multiple applications cannot safely use the same ehcache DiskStore. However, the lock file makes me wonder. Performance bottlenecks aside, can it work?
Context: I'm wondering if two Java Servlet contexts running the same application could share a DiskStore.
The answer is no.
You could use Terracotta server array instead. Or, as a second alternative, a replicated cache might suit you as well where each application / instance has it's own local DiskStore.
这篇关于ehcache磁盘存储可以同时安全访问吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!