Updating Entries

A cached entry can be updated using these methods:

  • Explicitly, when a client invokes a put operation on an existing entry.
  • Implicitly, when a get is performed on an entry that has an invalid value in the cache. An entry can become invalid through an explicit API call, through an automated expiration action, or by being created with a value of null.
  • Automatically, when a new entry value is distributed from another cache.

Similar to entry creation, all of these operations can be aborted by a cache writer.

The get function returns a direct reference to the entry value object. A change made using that reference is called an in-place change because it directly modifies the contents of the value in the local cache. For details on safe cache access, see Managing the Lifetime of a Cached Object.