Note

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

Access to this page requires authorization. You can try .

MemoryCache.PhysicalMemoryLimit Property

Definition

Namespace:
System.Runtime.Caching
Assembly:
System.Runtime.Caching.dll
Package:
System.Runtime.Caching v11.0.0-preview.5.26302.115
Source:
MemoryCache.cs
Source:
MemoryCache.cs
Source:
MemoryCache.cs
Source:
MemoryCache.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.

Gets the percentage of total system physical memory usage at which the cache will begin evicting entries.

public:
 property long PhysicalMemoryLimit { long get(); };
public long PhysicalMemoryLimit { get; }
member this.PhysicalMemoryLimit : int64
Public ReadOnly Property PhysicalMemoryLimit As Long

Property Value

The percentage of overall physical memory usage on the system that triggers cache eviction.

Remarks

The PhysicalMemoryLimit property specifies the percentage of total physical memory usage on the system (by all processes) at which the cache will begin to evict entries. This setting is not a limit on the memory that a single MemoryCache instance can use. Instead, when overall system physical memory usage exceeds this percentage, the cache proactively removes entries to help reduce memory pressure and avoid exhausting system memory, even if the cache itself is not over its other size limits.

You can specify the settings for the PhysicalMemoryLimit property in the application configuration file. Alternatively, they can be passed by a caller when the MemoryCache instance is initialized.

Applies to

See also


Feedback

Was this page helpful?