Cache.EffectivePrivateBytesLimit 属性

定义

获取可用于缓存的字节数。Gets the number of bytes available for the cache.

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

属性值

可用于缓存的字节数。The number of bytes available for the cache.

示例

EffectivePercentagePhysicalMemoryLimit

注解

EffectivePrivateBytesLimit属性返回应用程序进程可以使用的字节数。The EffectivePrivateBytesLimit property returns the number of bytes that can be used by the application process. 达到此限制后, 缓存算法开始主动清理缓存。Once this limit is reached, the cache algorithm begins aggressively scavenging the cache.

可以在应用程序的配置文件privateBytesLimit中, 将属性设置为缓存元素的缓存元素(ASP.NET设置架构)元素的特性。EffectivePrivateBytesLimit The EffectivePrivateBytesLimit property can be set with the privateBytesLimit attribute of the cache Element for caching (ASP.NET Settings Schema) element in the application's configuration file. 如果未privateBytesLimit设置该属性, 则缓存算法将确定缓存的最大大小, EffectivePrivateBytesLimit并且属性包含算法选择的大小。When the privateBytesLimit attribute is not set, the cache algorithm determines the maximum size of the cache, and the EffectivePrivateBytesLimit property contains the size chosen by the algorithm.

适用于