The Anubhav portal was launched in March 2015 at the behest of the Hon'ble Prime Minister for retiring government officials to leave a record of their experiences while in Govt service .
The technique of
Cache expiration determines the duration data remains inside the cache until it is deemed outdated. The management of updated cache data with source content, together with efficient memory resource management, makes this technique effective.
Two essential methods exist to manage cache expiration.
Time-based expiration (TTL – Time To Live)
When using this approach, users retain items with a preset expiration limit. The system assigns a TTL value at the time of adding an item to the cache, with 10 minutes being an example period. After the specified duration expires, the cache system automatically deletes data even though it remains unused. The TTL system enables web browsers and CDN caches, and DNS caching to determine when fresh resources must be obtained due to stored resource expiration limits.
Access-based expiration (LRU – Least Recently Used)
Access pattern records help some storage systems decide when data should become obsolete. LRU caching has a mechanism for removing unused items first from the full cache. The expiration method avoids using time because it focuses on both data usage frequency and recency. The data caching system maintains the most useful data points in its active cache area.
Manual or event-based invalidation provides a method to delete cached data when particular trigger events take place
(for example, updates to database records).
The appropriate implementation of cache expiration allows users to access modern data, combined with performance benefits. The absence of proper cache expiration methods would force caches to display out-of-date information, thus causing data inconsistencies. Developers need to select expiration techniques according to their specific use case to achieve ideal speed and freshness, together with optimal resource utilization.
Liked By
Write Answer
How does cache expiration work?
We use cookies to ensure you have the best browsing experience on our website. By using our site, you
acknowledge that you have read and understood our
Cookie Policy &
Privacy Policy
Join MindStick Community
You have need login or register for voting of answers or question.
Khushi Singh
07-Apr-2025The technique of Cache expiration determines the duration data remains inside the cache until it is deemed outdated. The management of updated cache data with source content, together with efficient memory resource management, makes this technique effective.
Two essential methods exist to manage cache expiration.
Time-based expiration (TTL – Time To Live)
When using this approach, users retain items with a preset expiration limit. The system assigns a TTL value at the time of adding an item to the cache, with 10 minutes being an example period. After the specified duration expires, the cache system automatically deletes data even though it remains unused. The TTL system enables web browsers and CDN caches, and DNS caching to determine when fresh resources must be obtained due to stored resource expiration limits.
Access-based expiration (LRU – Least Recently Used)
Access pattern records help some storage systems decide when data should become obsolete. LRU caching has a mechanism for removing unused items first from the full cache. The expiration method avoids using time because it focuses on both data usage frequency and recency. The data caching system maintains the most useful data points in its active cache area.
Manual or event-based invalidation provides a method to delete cached data when particular trigger events take place
(for example, updates to database records).The appropriate implementation of cache expiration allows users to access modern data, combined with performance benefits. The absence of proper cache expiration methods would force caches to display out-of-date information, thus causing data inconsistencies. Developers need to select expiration techniques according to their specific use case to achieve ideal speed and freshness, together with optimal resource utilization.