Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

In reference to ASP.NET Caching, what is the purpose or reason for sliding expiration?

I am looking for a good explanation of why one would use sliding expiration when caching data in a Web application. It seems as if you would always want to cache content using absolute expiration so the data is forced to be refreshed. With sliding expiration you risk having your data be cached indefinitely. Is it only useful for caching static data? What is a common scenerio for when sliding expiration is helpful? Thanks.

like image 936
James Lawruk Avatar asked Jan 23 '26 21:01

James Lawruk


1 Answers

Some things might be okay to be cached indefinitely, but only if you have enough memory to keep them.

like image 95
Joel Coehoorn Avatar answered Jan 25 '26 13:01

Joel Coehoorn