HttpResponse.RemoveOutputCacheItem 方法

定义

使用默认的输出缓存提供程序从输出缓存中删除缓存项。Removes cached items from the output cache by using the default output-cache provider.

重载

RemoveOutputCacheItem(String, String)

使用指定的输出缓存提供程序删除所有与指定路径关联的输出缓存项。Uses the specified output-cache provider to remove all output-cache items that are associated with the specified path.

RemoveOutputCacheItem(String)

从缓存中移除与默认输出缓存提供程序关联的所有缓存项。Removes from the cache all cached items that are associated with the default output-cache provider. 此方法是静态的。This method is static.

RemoveOutputCacheItem(String, String)

使用指定的输出缓存提供程序删除所有与指定路径关联的输出缓存项。Uses the specified output-cache provider to remove all output-cache items that are associated with the specified path.

public:
 static void RemoveOutputCacheItem(System::String ^ path, System::String ^ providerName);
public static void RemoveOutputCacheItem (string path, string providerName);
static member RemoveOutputCacheItem : string * string -> unit
Public Shared Sub RemoveOutputCacheItem (path As String, providerName As String)

参数

path
String

从缓存中删除的项的虚拟绝对路径。The virtual absolute path of the items that are removed from the cache.

providerName
String

用于删除与指定路径关联的输出缓存项的提供程序。The provider that is used to remove the output-cache artifacts that are associated with the specified path.

例外

path 为 null。path is null.

path 是无效路径。path is an invalid path.

注解

调用此方法可删除与网站配置文件中指定的自定义输出缓存提供程序关联的输出缓存项。Call this method to remove output-cache items that are associated with the custom output-cache providers that are specified in the Web site configuration file. 若要删除与默认输出缓存提供程序关联的输出缓存项,请调用 RemoveOutputCacheItem(String) 方法重载。To remove output-cache items that are associated with the default output-cache provider, call the RemoveOutputCacheItem(String) method overload.

适用于

RemoveOutputCacheItem(String)

从缓存中移除与默认输出缓存提供程序关联的所有缓存项。Removes from the cache all cached items that are associated with the default output-cache provider. 此方法是静态的。This method is static.

public:
 static void RemoveOutputCacheItem(System::String ^ path);
public static void RemoveOutputCacheItem (string path);
static member RemoveOutputCacheItem : string -> unit
Public Shared Sub RemoveOutputCacheItem (path As String)

参数

path
String

已从缓存中移除的项的虚拟绝对路径。The virtual absolute path to the items that are removed from the cache.

例外

pathnullpath is null.

path 并非绝对虚拟路径。path is not an absolute virtual path.

注解

调用此方法可移除与默认输出缓存提供程序关联的输出缓存项。Call this method to remove output-cache items that are associated with the default output-cache provider. 调用 RemoveOutputCacheItem 方法以删除与在网站配置文件中指定的自定义输出缓存提供程序关联的输出缓存项。Call the RemoveOutputCacheItem method to remove output-cache items that are associated with custom output-cache providers that are specified in the Web site configuration file.

适用于