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属性值是特定命名缓存配置的唯一标识符。 每个缓存配置必须具有唯一的 ID。

memoryCache在配置文件的 节中,唯一的缓存配置由namedCaches配置集合定义。 每个命名缓存项都需要配置文件中的唯一名称。 此值的长度必须至少为一个字符。

有关如何配置缓存的详细信息,请参阅 <namedCaches> 元素 (缓存设置)

适用于

另请参阅