Infinispan Expiration

From NovaOrdis Knowledge Base
Revision as of 02:34, 21 October 2016 by Ovidiu (talk | contribs) (→‎Lifespan)
Jump to navigation Jump to search

External

Internal

Overview

Expiration is the cache feature that allows the user to configure a lifespan and/or maximum idle time to cache entries. The entires that exceed these times are treated as invalid and are removed from the cache.

When an entry is removed from the cache due to expiration, it is NOT passivated (like evicted entries when passivation is turned on) but simply discarded. Also unlike eviction, expired entries are removed globally - from memory, cache stores, and cluster-wide.

If expiration is not explicitly configured or programmed via the API, the entires are by default immortal and do not have a lifespan or a maximum idle time.

Lifespan

The time interval, in milliseconds, from when a cache entry is created, after which the entry is expired globally. -1 means never expire.

Maximum Idle Time

Configuration

Lifespans and/or maximum idle times can be configured by adding the <expiration/> element to the cache configuration sections. For more details about expiration configuration, see:

Expiration Configuration