HttpResponse.RemoveOutputCacheItem 方法
本文内容
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
使用默认的输出缓存提供程序从输出缓存中删除缓存项。
RemoveOutputCacheItem(String, String) |
使用指定的输出缓存提供程序删除所有与指定路径关联的输出缓存项。 |
RemoveOutputCacheItem(String) |
从缓存中移除与默认输出缓存提供程序关联的所有缓存项。 此方法是静态的。 |
使用指定的输出缓存提供程序删除所有与指定路径关联的输出缓存项。
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
从缓存中删除的项的虚拟绝对路径。
- providerName
- String
用于删除与指定路径关联的输出缓存项的提供程序。
例外
path
为 null。
path
是无效路径。
注解
调用此方法可删除与网站配置文件中指定的自定义输出缓存提供程序关联的输出缓存项。 若要删除与默认 output-cache 提供程序关联的输出缓存项,请调用 RemoveOutputCacheItem(String) 方法重载。
适用于
.NET Framework 4.8.1 和其他版本
产品 | 版本 |
---|---|
.NET Framework | 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
从缓存中移除与默认输出缓存提供程序关联的所有缓存项。 此方法是静态的。
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
已从缓存中移除的项的虚拟绝对路径。
例外
path
为 null
。
path
并非绝对虚拟路径。
注解
调用此方法可删除与默认输出缓存提供程序关联的输出缓存项。 RemoveOutputCacheItem调用 方法可删除与网站配置文件中指定的自定义输出缓存提供程序关联的输出缓存项。
适用于
.NET Framework 4.8.1 和其他版本
产品 | 版本 |
---|---|
.NET Framework | 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |