MemoryCacheEntryExtensions.SetPriority Method

Definition

Sets the priority for keeping the cache entry in the cache during a memory pressure tokened cleanup.

C#
public static Microsoft.Extensions.Caching.Memory.MemoryCacheEntryOptions SetPriority(this Microsoft.Extensions.Caching.Memory.MemoryCacheEntryOptions options, Microsoft.Extensions.Caching.Memory.CacheItemPriority priority);

Parameters

options
MemoryCacheEntryOptions

The option on which to set the priority.

priority
CacheItemPriority

The CacheItemPriority to set on the option.

Returns

The MemoryCacheEntryOptions so that additional calls can be chained.

Applies to

Tuote Versiot
.NET 8 (package-provided), 9 (package-provided), 10 (package-provided)
.NET Standard 2.0 (package-provided)