Gets all the cached objects with the specified tag.

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 override Hashtable GetByTag(
	Tag tag
)
Visual Basic
Public Overrides Function GetByTag ( 
	tag As Tag
) As Hashtable
Visual C++
public:
virtual Hashtable^ GetByTag(
	Tag^ tag
) override

Parameters

tag
Type: Alachisoft.NCache.Runtime.Caching..::..Tag
The tag to search with.

Return Value

Type: Hashtable
Returns a dictionary containing the cache keys and associated objects.

Examples

The following example demonstrates how to get the objects with the specified tag.
 Copy imageCopy
Cache cache = NCache.InitializeCache("myCache");
Tag tag = new Tag("Sports");
Hashtable table = cache.GetByTag(tag);

See Also