Note

Access to this page requires authorization. You can try signing in or .

Access to this page requires authorization. You can try .

MemoryCacheOptions Class

Definition

Namespace:
Microsoft.Extensions.Caching.Memory
Assembly:
Microsoft.Extensions.Caching.Memory.dll
Package:
Microsoft.Extensions.Caching.Memory v11.0.0-preview.5.26302.115
Source:
MemoryCacheOptions.cs
Source:
MemoryCacheOptions.cs
Source:
MemoryCacheOptions.cs
Source:
MemoryCacheOptions.cs

Important

Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.

Specifies options for MemoryCache.

public ref class MemoryCacheOptions : Microsoft::Extensions::Options::IOptions<Microsoft::Extensions::Caching::Memory::MemoryCacheOptions ^>
public class MemoryCacheOptions : Microsoft.Extensions.Options.IOptions<Microsoft.Extensions.Caching.Memory.MemoryCacheOptions>
type MemoryCacheOptions = class
 interface IOptions<MemoryCacheOptions>
Public Class MemoryCacheOptions
Implements IOptions(Of MemoryCacheOptions)
Inheritance
MemoryCacheOptions
Derived
Implements

Constructors

Name Description
MemoryCacheOptions()

Properties

Name Description
Clock

Gets or sets the clock used by the cache for expiration.

CompactionPercentage

Gets or sets the amount the cache is compacted by when the maximum size is exceeded.

CompactOnMemoryPressure
Obsolete.

Gets or sets a value that indicates whether the cache is compacted when the maximum size is exceeded.

ExpirationScanFrequency

Gets or sets the minimum length of time between successive scans for expired items.

Name

Gets or sets the name of this cache instance.

SizeLimit

Gets or sets the maximum size of the cache.

TrackLinkedCacheEntries

Gets or sets a value that indicates whether linked entries are tracked.

TrackStatistics

Gets or sets a value that indicates whether memory cache statistics are tracked.

Explicit Interface Implementations

Name Description
IOptions<MemoryCacheOptions>.Value

Gets the default configured TOptions instance.

Applies to


Feedback

Was this page helpful?