Returns the cached objects that have any of the same tags in common. (Returns the Union set.)

Namespace: Alachisoft.NCache.Web.Caching
Assembly: Alachisoft.NCache.Web (in Alachisoft.NCache.Web.dll) Version: 4.3.0.0 (4.3.0.0)

Syntax

C#
public virtual Hashtable GetByAnyTag(
	Tag[] tags
)
Visual Basic
Public Overridable Function GetByAnyTag ( 
	tags As Tag()
) As Hashtable
Visual C++
public:
virtual Hashtable^ GetByAnyTag(
	array<Tag^>^ tags
)

Parameters

tags
Type: array<Alachisoft.NCache.Runtime.Caching..::..Tag>[]()[][]
An array of Tag to search with.

Return Value

Type: 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.
 Copy imageCopy
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);

See Also