Property Tags
Tags
Using Tags, you can associate keywords(s) with your cache items. You can mark your data with tags which act as identifiers for your cache items. Using this property, you can easily set tags for a cache item.
Declaration
public Tag[] Tags { get; set; }
Property Value
Type | Description |
---|---|
Tag[] |
Examples
Example sets multiple Tag of a cache item
Product product = new Product();
product.Id = 1;
product.Name = "Chai";
CacheItem item = new CacheItem(product);
Tag[] tags = new Tag[2];
tags[0] = new Tag("alpha");
tags[1] = new Tag("beta");
item.Tags = tags;