• Webinars
  • Docs
  • Download
  • Blogs
  • Contact Us
Try Free
Show / Hide Table of Contents

Method RemoveByTags

RemoveByTags(IEnumerable<Tag>, TagSearchOptions)

Removes the cached objects that have tags with specified TagSearchOptions.

Declaration
void RemoveByTags(IEnumerable<Tag> tags, TagSearchOptions type)
Parameters
Type Name Description
System.Collections.Generic.IEnumerable<Tag> tags

IEnumerable collection of tags to search cache with.

TagSearchOptions type

TagSearchOptions specifies the search type for the tags.

Examples

The following example demonstrates how to remove the objects with the specified tags with TagSearchOptions.

ICache cache = CacheManager.GetCache("demoCache");

Tag[] tags = new Tag[2];
tags[0] = new Tag("Alpha");
tags[1] = new Tag("Beta");

cache.SearchService.RemoveByTags(tags, TagSearchOptions.ByAllTags);
Back to top Copyright © 2017 Alachisoft