Data Expiration Strategies in Cache
NCache supports time-based data invalidation, allowing cache items to expire after a specified duration or interval. This is useful when the expected frequency of data changes is known, for example, region metadata that updates infrequently can safely expire on a time schedule.
Note
This feature is also available in the NCache Community Edition, except for Default Expiration.
Time-based expiration also helps ensure clients always receive fresh data. For instance, if product inventory is updated in the database but not yet reflected in the cache, expiring the stale cache entry allows updated data to be loaded on the next request. It is equally effective for session management: sessions that remain idle for a defined period can be automatically removed from the cache.
In This Section
Data Expiration Overview
Explains use cases and behaviors for Absolute Expiration, Sliding Expiration, and Default Expiration.
Absolute Data Expiration
Explains how to perform operations using Absolute Expiration.
Sliding Data Expiration
Explains how to perform operations using Sliding Expiration.