MemoryCacheEntryExtensions.SetSize(MemoryCacheEntryOptions, Int64) Method

Definition

Sets the size of the cache entry value.

C#
public static Microsoft.Extensions.Caching.Memory.MemoryCacheEntryOptions SetSize(this Microsoft.Extensions.Caching.Memory.MemoryCacheEntryOptions options, long size);

Parameters

options
MemoryCacheEntryOptions

The options to set the entry size on.

size
Int64

The size to set on the MemoryCacheEntryOptions.

Returns

The MemoryCacheEntryOptions so that additional calls can be chained.

Applies to

Product Versions
.NET 8 (package-provided), 9 (package-provided), 10 (package-provided)
.NET Standard 2.0 (package-provided)