CacheEntryExtensions.SetPriority(ICacheEntry, CacheItemPriority) 方法

定义

设置在内存压力标记的清理过程中保留缓存中的缓存项的优先级。

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::Caching::Memory::ICacheEntry ^ SetPriority(Microsoft::Extensions::Caching::Memory::ICacheEntry ^ entry, Microsoft::Extensions::Caching::Memory::CacheItemPriority priority);
public static Microsoft.Extensions.Caching.Memory.ICacheEntry SetPriority (this Microsoft.Extensions.Caching.Memory.ICacheEntry entry, Microsoft.Extensions.Caching.Memory.CacheItemPriority priority);
static member SetPriority : Microsoft.Extensions.Caching.Memory.ICacheEntry * Microsoft.Extensions.Caching.Memory.CacheItemPriority -> Microsoft.Extensions.Caching.Memory.ICacheEntry
<Extension()>
Public Function SetPriority (entry As ICacheEntry, priority As CacheItemPriority) As ICacheEntry

参数

entry
ICacheEntry

要为其设置优先级的项。

priority
CacheItemPriority

要对项设置的 CacheItemPriority

返回

用于链接的 ICacheEntry

适用于