Cache replication | In-memory cache
Cache replication
Cache replication is a WebSphere Application Server service that provides the following benefits:
- Data is generated one time and copied or replicated to other servers in the cluster, saving time and resources and aiding in cache consistency.
- Cache entries that are not needed are removed or replaced on all cluster members, again, aiding in cache content consistency across the cluster.
The data replication configuration can exist as part of the Web container dynamic cache configuration accessible through the administrative console, or on a per-cache entry basis through the cachespec.xml file. The sharing policy set on a particular cache-entry overrides the default sharing policy set on the replication domain.
Cache replication can take on various forms:
- PUSH - Cache entries for this object are automatically distributed to the dynamic caches in peer-distributed servers.
- PUSH/PULL - Cache entries for this object are shared between application servers on demand. When an application server generates a cache entry, it broadcasts the cache ID of the created entry to all cooperating application servers. Each server then knows whether an entry exists for any given cache ID. On a given request for that entry, the application server knows whether to generate the entry or pull it from somewhere else. When using PUSH-PULL, if the WebSphere Application Server level is greater than 6.0.2.15, ensure that you have the following APARS:
- PK32424
- PK27694
- PK36676
The dynamic cache service broadcasts cache replication updates asynchronously, based on a configurable batch update interval (on the dynamic cache service administrative console panel) rather than sending them immediately. Invalidations are sent immediately. Distribution of invalidations prevents stale data from residing in a cluster.