[Java programming language only]

Configuring near-cache invalidation

[Version 2.5 and later] 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

About this task

Enabling near-cache invalidation provides a more accurate set of data from the remote data grid because the near cache is updated when the remote data changes.

Procedure

[Version 2.5 and later] Create a dynamic map that includes the near-cache invalidation option. For more information, see Configuring dynamic maps. See the following examples of maps that have near-cache invalidation enabled:
my_grid.NCI
my_grid.CT.NCI
my_grid.LAT.NCI
my_grid.LUT.NCI
my_grid.NONE.NCI
my_grid.CT.O.NCI
my_grid.LAT.O.NCI
my_grid.LUT.O.NCI
my_grid.NONE.O.NCI
For a list of dynamic map configuration options, see Dynamic map configuration options.