CacheItemPolicy.Priority Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets or sets a priority setting that is used to determine whether to evict a cache entry.
public:
property System::Runtime::Caching::CacheItemPriority Priority { System::Runtime::Caching::CacheItemPriority get(); void set(System::Runtime::Caching::CacheItemPriority value); };
public System.Runtime.Caching.CacheItemPriority Priority { get; set; }
member this.Priority : System.Runtime.Caching.CacheItemPriority with get, set
Public Property Priority As CacheItemPriority
Property Value
One of the enumeration values that indicates the priority for eviction. The default priority value is Default, which means no priority.
Remarks
In ASP.NET, the priority enumeration only has two possible priorities: Default (which means no priority), and NotRemovable (which means the entry cannot be removed). Therefore, the only priority that can be set is whether a cache entry should remain in the cache forever.
Important
Adding an entry to the cache with a priority level of NotRemovable can cause the cache to overflow with entries that can never be removed. Cache implementations should set the NotRemovable priority for a cache entry only if the cache implementation provides ways to evict entries from the cache and to manage the number of cache entries.
Applies to
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈