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.1.0.0 (4.1.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

Returns a dictionary containing the cache keys and associated objects.

Examples

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

See Also