Method GetKeysByAnyTag
GetKeysByAnyTag(Tag[])
Returns keys that have any of the same tags in common. (Returns the Union set.)
Declaration
public virtual ICollection GetKeysByAnyTag(Tag[] tags)
Parameters
Type | Name | Description |
---|---|---|
Tag[] | tags | An array of Tag to search with. |
Returns
Type | Description |
---|---|
System.Collections.ICollection | A collection containing cache keys. |
Examples
The following example demonstrates how to get the keys that have any of the specified tags in common.
Cache cache = NCache.InitializeCache("myCache");
Tag[] tags = new Tag[2];
tags[0] = new Tag("Alpha");
tags[1] = new Tag("Beta");
ICollection keys = cache.GetKeysByAnyTag(tags);