Alachisoft NCache 4.1 - Online Documentation

Register NCache with EntLib 5.0 CAB using Configuration Console

 
Following are the steps to register NCache as Custom Cache Manager:
 
  1. Include Enterprise Librarys Caching.dll, Common.dll, ObjectBuilder2.dll, Unity.dll and Alachisoft's CacheManager.dll references to project.
  2. Add new Caching Application Block through Enterprise Library Configuration Console.
     
     
     
     
  3. Add a new Custom Cache Manager.
     
     
     
     
  4. Select NCache CacheManager assembly as a Custom Cache Manager Provider type. You can also specify Custom Cache Manager's name here as shown in the figure.
    You can find "Alachisoft.NCache.EnterpriseLibrary.Caching.CacheManager.dll" file at "%InstallDir%/NCache/bin/assembly/clr20".
     
     
     
     
  5. Add a key CacheId, and a cache id as value that acts as your primary cache under enterprise library's Caching Application Block.
  6. Add a key CacheExceptions, and its value (true/false) for enabling caching exceptions thrown to client application
     
     
     
  7. Assign Default Cache Manager value to be the cache manager you just have created.
     
     
     
     
  8. Save the configurations as App.config in your project folder and add it in your project.
     
     
     
     
  9. Your sample configuration, dealing with NCache as a custom cache manager would look like this.
     
     
     
     
    Note: Your object must be tagged as serializable while using NCache as your primary store.
 
 
See Also
 
Copyright © 2005-2012 Alachisoft. All rights reserved.