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.
- You must create a simple data grid in the
user interface. See Creating simple data grids for more
information.
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
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.