Removes the cached objects with the specified tag.

Namespace: Alachisoft.NCache.Web.Caching
Assembly: Alachisoft.NCache.Web (in Alachisoft.NCache.Web.dll) Version: 4.1.0.0 (4.1.0.0)

Syntax

C#
public virtual void RemoveByTag(
	Tag tag
)
Visual Basic
Public Overridable Sub RemoveByTag ( _
	tag As Tag _
)
Visual C++
public:
virtual void RemoveByTag(
	Tag^ tag
)

Parameters

tag
Type: Alachisoft.NCache.Runtime.Caching..::..Tag
A Tag to search with.

Examples

The following example demonstrates how to remove the objects with the specified tag.
CopyC#
Cache cache = NCache.InitializeCache("myCache");
Tag tag = new Tag("Alpha");
cache.RemoveByTag(tag);

See Also