Removes the cached objects with the specified tag.

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

Syntax

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

Parameters

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

Examples

The following example demonstrates how to remove the objects that have the specified tag.
 Copy imageCopy
Cache cache = NCache.InitializeCache("myCache");
Tag tag = new Tag("Alpha");
cache.RemoveByTag(tag);

See Also