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 from the cache.
Declaration
public CacheItemVersion Version { get; set; }
Property Value
Type | Description |
---|---|
CacheItemVersion | A numeric value used to represent the version of the cached item. |
Examples
The following example gets CacheItemVersion of a CacheItem.
CacheItem item = cache.GetCacheItem("Product0");
Console.WriteLine("Version: {0}", item.Version.Version);