Regarding ASP.NET caching, what is the purpose or reason for expiration?

I am looking for a good explanation of why you can use sliding completion when caching data in a web application. It seems that you will always want to cache the content using an absolute term so that the data is updated. With expiration, you risk that your data will be cached indefinitely. Is this useful only for caching static data? What is a common scenerio for when glide acceleration is useful? Thank you

+3
source share
3 answers

Yes, data can be cached indefinitely - which, as you say, only makes sense if it is static.

This is useful when you have an expensive piece of data (for example, it takes a lot of time to calculate, extract, etc.), which will be useful for an unknown period of time, but most calls will be close to each other.

- , , . . , (, ), , , , .

, - , , ..

+1

, .

+2

, . , , ( , , ).

, , - , , . , , , , . , 3 , , .

+2

Source: https://habr.com/ru/post/1712057/


All Articles