Reputation: 17373
My web application uses enterprise library caching module. I've a config value below for Enterprise Library 4.0.
<cacheOptions>
<add name="Cache" cachePartition="Content" slidingExpirationTime="30" cachePrioriy="High" />
</cacheOptions>
If the user clicks 24 times on web page button does it mean that the caching expiration willl happen only after 24*30min ?
Thanks.
Upvotes: 1
Views: 90
Reputation: 32134
No, what it means is that an item is removed from the cache when it hasn't been accessed for 30 minutes.
Suppose you add an item A
to the cache at t0
. If you do not retrieve A
from the cache for the next 30 minutes, it will be removed at t0 + 30
. However, suppose you retrieve the item at t0 + 10
. Now the expiration time 'slides' 10 minutes and your item will be removed at t0 + 40
.
Cached items are removed 30 minutes after they are last accessed.
Upvotes: 2