編輯

共用方式為


CacheInsertOptions.SlidingExpiration Property

Definition

Gets or sets the interval between the time the inserted object is last accessed and the time at which that object expires. If this value is the equivalent of 20 minutes, the object will expire and be removed from the cache 20 minutes after it was last accessed.

public:
 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

The interval between the time the inserted object is last accessed and the time at which that object expires.

Applies to