Share via


MemoryCacheElement.Name 屬性

定義

取得或設定特定快取組態的名稱。

public:
 property System::String ^ Name { System::String ^ get(); void set(System::String ^ value); };
[System.ComponentModel.TypeConverter(typeof(System.Configuration.WhiteSpaceTrimStringConverter))]
[System.Configuration.ConfigurationProperty("name", DefaultValue="", IsKey=true, IsRequired=true)]
[System.Configuration.StringValidator(MinLength=1)]
public string Name { get; set; }
[<System.ComponentModel.TypeConverter(typeof(System.Configuration.WhiteSpaceTrimStringConverter))>]
[<System.Configuration.ConfigurationProperty("name", DefaultValue="", IsKey=true, IsRequired=true)>]
[<System.Configuration.StringValidator(MinLength=1)>]
member this.Name : string with get, set
Public Property Name As String

屬性值

快取組態的名稱,

屬性

備註

Name屬性值是特定具名快取組態的唯一標識符。 每個快取組態都必須有唯一標識碼。

memoryCache在組態檔的 區段中,組態集合會定義唯一的namedCaches快取組態。 每個具名快取專案都需要組態檔中的唯一名稱。 此值必須至少有一個字元長。

如需如何設定快取的詳細資訊,請參閱 <namedCaches> 元素 (快取設定)

適用於

另請參閱