Expiration means the eviction of expired records. A record is expired:
- if it is not touched (accessed/read) for
time-to-live-secondspassed since it is put to Near Cache
The actual expiration is performed in two cases:
- When a record is accessed: it is checked if the record is expired or not. If it is expired, it is evicted and
nullis returned as the value to the caller.
- In the background: there is an expiration task that periodically (currently 5 seconds) scans records and evicts the expired records.