Configuration Differences Between AppFabric and NCache
AppFabric has been discontinued by Microsoft, hence, companies are looking for solutions that may be a substitute or an upgrade over AppFabric. NCache provides more control over the caching content than AppFabric.
First of all, NCache configuration and AppFabric configuration is completely different. AppFabric takes the cache configuration at runtime whereas NCache is configured before the application is run. The following table shows all the configuration classes that are used to configure AppFabric which will NOT be required for NCache.
AppFabric Configuration class | Description |
---|---|
Microsoft.ApplicationServer.Caching.BaseOperationNotification |
This class serves the same purpose as in the native AppFabric Caching API. |
Microsoft.ApplicationServer.Caching.DataCacheBulkNotificationCallBack |
Specifies a callback which is called with a list of cache operations. |
Microsoft.ApplicationServer.Caching.DataCacheClientLogManager |
This class is only defined for compatibility. Cache client logs in NCache can be enabled with different log levels by setting the required configuration values in the client.ncconf file. |
Microsoft.ApplicationServer.Caching.DataCacheErrorCode |
This class serves the same purpose as in the native AppFabric Caching API. |
Microsoft.ApplicationServer.Caching.DataCacheException |
Instances of this class are returned as exceptions in case of cache-related operations. The NCache exceptions related to cache operations are provided as inner exceptions. |
Microsoft.ApplicationServer.Caching.DataCacheFailureNotificationCallBack |
This class is only defined for compatibility purposes. NCache does not support failure notification. |
Microsoft.ApplicationServer.Caching.DataCacheItem |
This class is used to create instances that group the cached object value together with its metadata including region, timeout, tags, and version. These values are populated using the NCache CacheItem instances returned. |
Microsoft.ApplicationServer.Caching.DataCacheItemVersion |
This represents the version of the cached object and is also used for Optimistic Concurrency strategy and is used the same way as in native AppFabric API. |
Microsoft.ApplicationServer.Caching.DataCacheServerEndpoint |
This class is used to provide server information when programmatically configuring cache server information of a named cache. |
Microsoft.ApplicationServer.Caching.DataCacheFactoryConfiguration |
Only the Servers, RequestTimeout and ChannelOpenTimeout properties of this class are used for programmatically configuring a named cache's server information. All other properties are only for compatibility purposes. |
Microsoft.ApplicationServer.Caching.DataCacheLocalCacheInvalidationPolicy |
This class is only defined for compatibility purposes. |
Microsoft.ApplicationServer.Caching.DataCacheLocalCacheProperties |
This class is only defined for compatibility purposes. |
Microsoft.ApplicationServer.Caching.DataCacheLockHandle |
This class uses Pessimistic Concurrency strategy just as with native AppFabric API and internally uses NCache locking functionality. |
Microsoft.ApplicationServer.Caching.DataCacheNotificationCallBack |
It represents a callback method that is to be invoked by a cache notification when one or more cache operations take place. |
Microsoft.ApplicationServer.Caching.DataCacheNotificationDescriptor |
This class is used as an identifier parameter to a DataCacheNotificationCallBack and DataCacheBulkNotificationCallBack delegate. |
Microsoft.ApplicationServer.Caching.DataCacheNotificationProperties |
This class is only defined for compatibility purposes. Notification properties are configured through NCache management tools. |
Microsoft.ApplicationServer.Caching.DataCacheOperationDescriptor |
This serves the same purpose as in native AppFabric API. |
Microsoft.ApplicationServer.Caching.DataCacheOperations |
This serves the same purpose as in native AppFabric API. |
Microsoft.ApplicationServer.Caching.DataCacheFactory |
This class is used to create names and default cache handles to be used for CRUD operations. |
Microsoft.ApplicationServer.Caching.DataCache |
This class is used for object caching CRUD operations. It uses an NCache cache handle behind the scenes. |
Microsoft.ApplicationServer.Caching.DataCacheSecurity |
This class is only defined for compatibility purposes. |
Microsoft.ApplicationServer.Caching.DataCacheSecurityMode |
This class is only defined for compatibility purposes. NCache security features are enabled using NCache management tools. |
Microsoft.ApplicationServer.Caching.DataCacheTag |
This class can be used to add tags' metadata to cached objects for tag-based search and retrieval. |
Microsoft.ApplicationServer.Caching.DataCacheTransportProperties |
This class is only defined for compatibility purposes. |
Microsoft.ApplicationServer.Caching.DataCacheProtectionLevel |
This class is only defined for compatibility purposes. NCache security features are enabled using NCache management tools. |
The next section provides a step-by-step guide to migrate an AppFabric application to NCache using the AppFabric Wrapper.
See Also
Migrating AppFabric Application to NCache
.NET API Reference for NCache