MemoryCacheEntryExtensions.SetPriority 方法

定义

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

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

参数

options
MemoryCacheEntryOptions

要设置其优先级的选项。

priority
CacheItemPriority

要对选项设置的 CacheItemPriority

返回

MemoryCacheEntryOptions,以便可以链接其他调用。

适用于