Jira Atlassian Cache

Hello,
I am developing a plugin for Jira Data Center which uses Atlassian Cache. I followed this article:
https://developer.atlassian.com/server/confluence/atlassian-cache-2-overview/
The problem is that my cache works fine locally but it does not want to replicate along Data Center Nodes. I am creating serializable classes but it still does not want to replicate. I am definately missing something. What can be the problem? Maybe someone has an example. It would help a lot. Thank you in advance.
I create the cache like this

cache = cacheManager.getCache(CACH_NAME,
new IssueViewersCacheLoader(utilHelper,jiraAuthenticationContext),
new CacheSettingsBuilder().remote().replicateViaCopy().expireAfterWrite(var1, TimeUnit.MINUTES).build());

How are you creating the cache? Are you creating a cluster cache? Can you post code?

I am creating the cache like this

 cache = cacheManager.getCache(CACH_NAME,
     new IssueViewersCacheLoader(utilHelper,jiraAuthenticationContext),
     new CacheSettingsBuilder().remote().replicateViaCopy().expireAfterWrite(var1, TimeUnit.MINUTES).build());