|General Region Data Management / Expiration|
Expiration removes old entries and entries that you are not using. You can destroy or invalidate entries.
Expiration activities in distributed regions can be distributed or local. Thus, one cache could control expiration for a number of caches in the system.
This figure shows two basic expiration settings for a producer/consumer system. The producer member (on the right) populates the region from a database and the data is automatically distributed throughout the system. The data is valid only for one hour, so the producer performs a distributed destroy on entries that are an hour old. The other applications are consumers. The consumers free up space in their caches by removing their local copies of the entries for which there is no local interest (idle-time expiration). Requests for entries that have expired on the consumers will be forwarded to the producer.
For overall region performance, idle time expiration in partitioned regions may expire some entries sooner than expected. To ensure reliable read behavior across the partitioned region, we recommend that you use entry-time-to-live for entry expiration in partitioned regions instead of entry-idle-time.
When the primary expires entries, it does not request last accessed statistics from the secondaries, as the performance hit would be too great. It expires entries based solely on the last time the entries were accessed in the primary copy.
You cannot use local-destroy or local-invalidate expiration actions in a partitioned region.
Before netSearch retrieves an entry value from a remote cache, it validates the remote entry’s statistics against the local region’s expiration settings. Entries that would have already expired in the local cache are passed over. Once validated, the entry is brought into the local cache and the local access and update statistics are updated for the local copy. The last accessed time is reset and the last modified time is updated to the time in the remote cache, with corrections made for system clock differences. Thus the local entry is assigned the true last time the entry was modified in the distributed system. The netSearch operation has no effect on the expiration counters in remote caches.
The netSearch method operates only on distributed regions with a data-policy of empty, normal and preloaded.