MemoryCache.PhysicalMemoryLimit Property
Definition
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.