Method GetKeysByAllTags
GetKeysByAllTags(Tag[])
Returns keys that have all the same tags in common. (Returns the Intersection set.)
Declaration
public virtual ICollection GetKeysByAllTags(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 all 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.GetKeysByAllTags(tags);