Property Version
Version
NCache uses cache item versioning. CacheItemVersion is a property associated with every cache item. It is basically a numeric value that is used to represent the version of the cached item which changes with every update to an item.
This property allows you to track whether any change occurred in an item or not. When you fetch an item from cache, you also fetch its current version in the cache.
Declaration
public CacheItemVersion Version { get; set; }
Property Value
Type | Description |
---|---|
CacheItemVersion |
Examples
Example gets CacheItemVersion of a cache item.
CacheItem item = cache.GetCacheItem("Product0");
Console.WriteLine("Version: {0}", item.Version.Version);