MemoryCacheElement.CacheMemoryLimitMegabytes プロパティ

定義

MemoryCache オブジェクトのインスタンスで許可される最大メモリ サイズ (MB 単位) を取得または設定します。

public:
 property int CacheMemoryLimitMegabytes { int get(); void set(int value); };
[System.Configuration.ConfigurationProperty("cacheMemoryLimitMegabytes", DefaultValue=0)]
[System.Configuration.IntegerValidator(MinValue=0)]
public int CacheMemoryLimitMegabytes { get; set; }
[<System.Configuration.ConfigurationProperty("cacheMemoryLimitMegabytes", DefaultValue=0)>]
[<System.Configuration.IntegerValidator(MinValue=0)>]
member this.CacheMemoryLimitMegabytes : int with get, set
Public Property CacheMemoryLimitMegabytes As Integer

プロパティ値

最大メモリ サイズ (MB 単位)。 既定値はゼロです。この値は、コンピューターが備えているメモリの量に基づいて、MemoryCache インスタンスがそれ自体のメモリを管理することを示します。

属性

注釈

プロパティの値は CacheMemoryLimitMegabytes 、構成要素の cacheMemoryLimitMegabytes 構成属性を namedCaches 表します。

キャッシュ サイズが指定された制限を超えると、メモリ キャッシュの実装によってキャッシュ エントリが削除されます。

このプロパティは、要素内で namedCaches 個別に設定でき、各 namedCaches 要素は一意のキャッシュ構成に対応します。

プロパティの CacheMemoryLimit 設定は、構成ファイルの cacheMemoryLimitMegabytes 構成属性から読み取ることができます。 または、クラスの初期化時に設定を MemoryCache 渡すことができます。

キャッシュを構成する方法の詳細については、「namedCaches> 要素 (キャッシュ設定)」を参照してください<

適用対象

こちらもご覧ください