CTP3 API Changes (Velocity)
"Velocity" Namespace
The "Velocity" namespace has been changed to Microsoft.Data.Caching. This change affects all classes, delegates, and enumerations in the API.
DataCache Prefix
The names of all classes in the "Velocity" namespace have had the prefix DataCache added to their name. The DataCache prefix groups all "Velocity" classes together in the IntelliSense scroll window.
"Default" Property Changes
The Cache.DefaultCache and Cache.DefaultRegion static properties have been removed. Instead of using Cache.DefaultCache to retrieve the name of the default cache, use the GetDefaultCache method to return a reference to the default cache. Instead of using Cache.DefaultRegion to specify whether you want cache operations to occur inside or outside of regions, use the corresponding method overloads that include or do not include the region parameter.
Region Parameter
Throughout the API, the region parameter has been moved to the last parameter in most methods. With some methods in CTP2, the value you passed to the region parameter determined whether the cache operation was inside a region or outside a region. In CTP3, new overloads have been created so that you only use the region parameter when you want a cache operation to take place inside a region. This change affects the following methods most significantly: Add, Put, Get, Remove, Unlock, PutAndUnlock, and ResetObjectTimeout.
Tags Parameter
The tags parameter, used by many methods to specify one or more DataCacheTag objects, has been changed to a generic type. In CTP3, instead of passing an array of DataCacheTag objects, pass a list of DataCacheTag objects.
Region Methods
The methods used to access objects in regions have been replaced. Also, the CreateRegion and RemoveRegion methods no longer return a true or false value.
The CTP2 Cache methods: GetEnumerator, GetAllEnumerator, GetAnyEnumerator, GetByTag, GetAllMatchingTags, and GetAnyMatchingTag have been removed. In place of these methods, CTP3 provides a group of GetObjects methods that return the specified objects in an IEnumerable KeyValuePair. The new methods are GetObjectsByTag, GetObjectsByAnyTag, GetObjectsByAllTags, and GetObjectsInRegion.
Cache Notifications API
To enable the cache notifications feature, one class, two delegates, and several new methods have been added to the "Velocity" API. For information about how to use the cache notifications API, see Using Cache Notifications (Velocity).