Invalidating or Destroying Cached Entries

Invalidating an entry sets the entry's value to NULL. Destroying it removes the entry from the region altogether. These operations can be carried out in the local cache in the following ways:

Note: A user-defined cache writer is called before an operation is completed, and can abort an entry destroy operation.

Whether carried out explicitly or through expiration activities, invalidation and destruction cause event notification: The CacheEvent object has an isExpiration flag that is set to true for events resulting from expiration activities, and set to false for all other events.