共用方式為


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,以便鏈結其他呼叫。

適用於