Configuring near-cache invalidation
You can configure near-cache invalidation to remove stale data from the near cache as quickly as possible. When an update, deletion, or invalidation operation is run against the remote data grid, an asynchronous invalidation operation gets triggered in the near cache. This mechanism works more quickly than the other option of using time-to-live (TTL) eviction in the near cache.
Before you begin
- You must be using IBM eXtremeIO. For more information, see Configuring IBM eXtremeIO (XIO).
- You must be using a near cache. To determine whether near cache is enabled, run the BackingMap.isNearCacheEnabled() method in your client. For more information about configuring the near cache, see Configuring the near cache.
About this task
You can edit the necessary settings in the ObjectGrid XML file for your container server. The settings in this file apply to all clients, unless you override the settings. If you enable near-cache invalidation on the server, you can disable the near-cache invalidation on the client by overriding the nearCacheInvalidationEnabled attribute for the near cache with either XML or programmatic configuration. However, you cannot override the attribute to enable the near-cache invalidation when near-cache invalidation is disabled on the server. For more information about overriding client settings, see Configuring Java clients with an XML configuration and Configuring Java clients programmatically.