Quick Start with .NET 4.0 Cache Provider
Following steps need to be followed for using cache provides in your application:
-
Create an application inside Visual Studio.NET.
-
Add following references to your application from "Installed Directory/NCache/integration/DotNet4.0 Cache Provider" path:
"Alachisoft.NCache.ObjectCacheProvider"
-
Include the following namespace in your project.
using Alachisoft.NCache.ObjectCacheProvider;
-
Initialize your CacheProvider and pass your cache name to the provider as shown below:
private ObjectCache _cache;
private string _cacheId = "myCache" ;
_cache = new CacheProvider(_cacheId);
-
Now you can perform all cache related operations on your cache using CacheProvider commands.
See Also