Udostępnij za pośrednictwem


CacheItemPolicy.SlidingExpiration Property

Retired Content

This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This page may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

The latest Enterprise Library information can be found at the Enterprise Library site.

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.

Namespace: Microsoft.Practices.EnterpriseLibrary.Caching.Runtime.Caching
Assembly: Microsoft.Practices.EnterpriseLibrary.Caching.Silverlight (in Microsoft.Practices.EnterpriseLibrary.Caching.Silverlight.dll) Version: 5.0.505.0

Syntax

public TimeSpan SlidingExpiration { get; set; }
'Declaration
Public Property SlidingExpiration As TimeSpan
    Get
    Set
public:
property TimeSpan SlidingExpiration {
    TimeSpan get ();
    void set (TimeSpan value);
}

Return 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 System.Runtime.Caching.ObjectCache.NoSlidingExpiration, meaning that the item should not be expired based on a time span.

See Also

CacheItemPolicy Class

Microsoft.Practices.EnterpriseLibrary.Caching.Runtime.Caching Namespace