<清除 > 元素<namedCaches ><clear> Element for <namedCaches>

清除所有namedCache中的条目namedCaches内存缓存的集合。Clears all namedCache entries in the namedCaches collection for a memory cache.

<system.runtime.caching><system.runtime.caching>
<memoryCache><memoryCache>
<namedCaches><namedCaches>
<add><add>

语法Syntax

<namedCaches>  
    <clear name="default" />  
    <!-- child elements -->  
 </namedCaches>  

类型Type

Type

特性和元素Attributes and Elements

下列各节描述了特性、子元素和父元素。The following sections describe attributes, child elements, and parent elements.

特性Attributes

None

子元素Child Elements

None

父元素Parent Elements

元素Element 描述Description
<namedCaches><namedCaches> 包含的配置设置的命名集合MemoryCache实例。Contains a collection of configuration settings for the named MemoryCache instances.

备注Remarks

clear元素中清除所有namedCache内存缓存的命名的缓存集合中的条目。The clear element clears all namedCache entries in the named cache collection for a memory cache. 可以使用clear元素在使用之前add要添加新命名的缓存条目,以确保没有其他元素名为集合中的缓存。You can use the clear element before you use the add element to add a new named cache entry in order to be certain there are no other named caches in the collection.

请参阅See also