NCache 4.6 - Online Documentation

Removing Items from Cache Containing Tag

 
The following examples demonstrate how to remove items from NCache either containing a specified tag, any tag from the list, or all the tags in the list.
 
      To utilize the API, include the following namespace in your application: Alachisoft.NCache.Web.Caching.
 
        //For removing keys containing specified tag
        cache.RemoveByTag(productTags[0]);
 
        //For removing keys containing at least one tag from tags list.
        cache.RemoveByAnyTag(productTags);
 
        //For removing keys containing all tags from list
        cache.RemoveByAllTags(productTags);
 
 
See Also