CacheStoreProvider.Remove Method

Definition

Removes the specified item from the cache.

Overloads

Remove(String)

Removes the item from the cache.

Remove(String, CacheItemRemovedReason)

Removes the specified item from the cache if it exists.

Remove(String)

Removes the item from the cache.

C#
public abstract object Remove(string key);

Parameters

key
String

The identifier for the cache item.

Returns

The item if it exits; otherwise null.

Applies to

.NET Framework 4.8.1 and other versions
Product Versions
.NET Framework 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1

Remove(String, CacheItemRemovedReason)

Removes the specified item from the cache if it exists.

C#
public abstract object Remove(string key, System.Web.Caching.CacheItemRemovedReason reason);

Parameters

key
String

The identifier for the cache item to remove.

reason
CacheItemRemovedReason

The reason the item was removed.

Returns

The removed item.

Applies to

.NET Framework 4.8.1 and other versions
Product Versions
.NET Framework 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1