CacheItemPolicy.SlidingExpiration Property


Gets or sets a value that indicates whether a cache entry should be evicted if it has not been accessed in a given span of time.

 property TimeSpan SlidingExpiration { TimeSpan get(); void set(TimeSpan value); };
public TimeSpan SlidingExpiration { get; set; }
member this.SlidingExpiration : TimeSpan with get, set
Public Property SlidingExpiration As TimeSpan

Property Value

A span of time within which a cache entry must be accessed before the cache entry is evicted from the cache. The default is NoSlidingExpiration, meaning that the item should not be expired based on a time span.

Applies to