Gets all the keys 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 virtual ICollection GetKeysByTag(
	Tag tag
)
Visual Basic
Public Overridable Function GetKeysByTag ( _
	tag As Tag _
) As ICollection
Visual C++
public:
virtual ICollection^ GetKeysByTag(
	Tag^ tag
)

Parameters

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

Return Value

Returns collection containing the cache keys.

Examples

The following example demonstrates how to get the keys with the specified tag.
CopyC#
Cache cache = NCache.InitializeCache("myCache");
Tag tag = new Tag("Sports");
ICollection keys = cache.GetKeysByTag(tag);

See Also