Method GetByAnyTag
GetByAnyTag(Tag[])
Returns the cached objects that have any of the same tags in common. (Returns the Union set.)
Declaration
public virtual Hashtable GetByAnyTag(Tag[] tags)
Parameters
Type | Name | Description |
---|---|---|
Tag[] | tags | An array of Tag to search with. |
Returns
Type | Description |
---|---|
System.Collections.Hashtable | A dictionary containing cache keys and associated objects. |
Examples
The following example demonstrates how to get the objects 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");
Hashtable table = cache.GetByAnyTag(tags);