ObjectCache.NoSlidingExpiration ObjectCache.NoSlidingExpiration ObjectCache.NoSlidingExpiration ObjectCache.NoSlidingExpiration Field


指示某个缓存项没有可调过期时间。Indicates that a cache entry has no sliding expiration time.

public: static initonly TimeSpan NoSlidingExpiration;
public static readonly TimeSpan NoSlidingExpiration;
 staticval mutable NoSlidingExpiration : TimeSpan
Public Shared ReadOnly NoSlidingExpiration As TimeSpan 



基于持续时间或定义的时间窗口过期也被称为可调过期。Expiration that is based on duration or a defined window of time is also referred to as sliding expiration. 通常情况下,逐出基于可调过期的项的缓存实现将删除在指定的时间段未被访问的项。Normally, a cache implementation that evicts items that are based on sliding expiration will remove an item that has not been accessed in the specified window of time.

插入到缓存与某个缓存项NoSlidingExpiration字段值设置为过期值应该永远不会收回由于非活动的滑动时间窗口中。A cache entry that is inserted into the cache with the NoSlidingExpiration field value set as the expiration value should never be evicted because of non-activity in a sliding time window. 但是,如果具有绝对到期,或某些其他逐出事件发生时,此类更改监视器或内存压力,可以逐出缓存项。However, a cache item can be evicted if it has an absolute expiration, or if some other eviction event occurs, such a change monitor or memory pressure.