I'm testing my caching logic in Jira Data Center.
CacheSettings settings = new CacheSettingsBuilder().remote().replicateViaCopy().expireAfterWrite(5, TimeUnit.MINUTES).build();
this.myCache = cacheManager.getCache(MY_CACHE_KEY, new LicenseUtilCacheLoader(), settings);
My cache needs to be highly consistent among all the nodes in the cluster. The update to a cache in a node needs to be replicated to other nodes.
# This ID must be unique across the cluster
jira.node.id = node1
# The location of the shared home directory for all Jira nodes
jira.shared.home = /users/dev/jira/7133_shared
ehcache.listener.hostName = 127.0.0.1
ehcache.listener.port = 40001
ehcache.object.port = 40011
With the configuration above, the update of a cache isn't being replicated to other nodes in the cluster. But the removal of the cache will invalidate the cache in other nodes.
Anything wrong with my implementation?