• Webinars
  • Docs
  • Download
  • Blogs
  • Contact Us
Try Free
Show / Hide Table of Contents

Property NamedTags

NamedTags

With Named Tags user is able to store additional information (of any type) required to query the object stored as string. Users are required to provide the list of named tags, each having two parameters, "key" (name of a tag) as string and "value" (assigned value) as any primitive type.

NCache then allows you to search your objects through these named tags. Named tags can be specified by using this property of CacheItem.

Declaration
public NamedTagsDictionary NamedTags { get; set; }
Property Value
Type Description
NamedTagsDictionary

Named tags can be specified by using this property of CacheItem.

Examples

Example sets named tags of a cache item

Product product = new Product();
product.Id = 1;
product.Name = "Chai";

CacheItem item = new CacheItem(product);

NamedTagsDictionary tags = new NamedTagsDictionary();
tags.Add("tag1", "alpha");
tags.Add("tag2", "beta");

item.NamedTags = tags;
Back to top Copyright © 2017 Alachisoft