DataCacheItemVersion.CompareTo Method (DataCacheItemVersion)
Used to compare two versions of the same item, specified with the same key.
Assembly: Microsoft.ApplicationServer.Caching.Core (in Microsoft.ApplicationServer.Caching.Core.dll)
The DataCacheItemVersion to be compared.
Return ValueType: System.Int32
An Int32value: 0 if the versions are equal, greater than zero if the instance is greater than the version parameter value, or less than zero if the instance is less than the version parameter value.
Version comparisons are only meaningful when comparing versions of the same item, specified with the same key. It is not possible to deduce order by comparing versions from different keys; this method may return a result, but the result is only valid for versions of the same key.
The DataCacheItemVersion is updated every time that the object is updated. Only the latest version of the object is stored on the cache cluster. Due to the distributed nature of the cluster, the cache client may not have the latest copy of the object. For this reason, the DataCacheItemVersion class is essential for concurrency operations.