NCache 4.3 - Online Documentation

Step 2: Using MS Velocity Wrapper API

 
To enable your existing velocity based app to use NCache, you need to make slight changes in your application. These changes are minimal and not a true code change, rather re-referencing your application to use NCache's Wrapper namespace. NCache supports regions in a different way.
 
  1. Remove reference to using System.Data.Caching; from your code file.
  2. Add reference to VelocityWrapper assembly named Alachisoft.NCache.Data.Caching.dll placed at %InstallDir%/NCache/bin/assembly/
  3. Add reference to Alachisoft.NCache.Web.dll, present in GAC.
     
     
     
     
  4. Add the following namespaces:
     
    using Alachisoft.NCache.Data.Caching;
    using Alachisoft.NCache.Web.Caching;
     
     
     
     
  5. Give fully qualified name of Cache to resolve ambiguity between Alachisoft.NCache.Web.Caching.Cache vs Alachisoft.NCache.Data.Caching.Cache classes.
     
     
Note:
  • For using regions you need to perform few extra steps
  • For defining a cache user need to first create a cache using NCacheManager.
 
 
See Also

 
© Copyright  2014 Alachisoft. All rights reserved.