Gets all the keys 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 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

Type: ICollection
Returns collection containing the cache keys.

Examples

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

See Also