Method RemoveByTag
RemoveByTag(Tag)
Removes the cached objects with the specified tag.
Declaration
public virtual void RemoveByTag(Tag tag)
Parameters
Type | Name | Description |
---|---|---|
Tag | tag | A Tag to search with. |
Examples
The following example demonstrates how to remove the objects with the specified tag.
Cache cache = NCache.InitializeCache("myCache");
Tag tag = new Tag("Alpha");
cache.RemoveByTag(tag);