NET Caching Library Help
Using Your License Key
Licensing > Using Your License Key

Using Your License Key

 

//Create a Primary Memory Cache with a backing File Cache

string directory = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), "KellermanSoftware", "NetCachingLibrary", "Example");

SmartConfig config = new SmartConfig(new MemoryCacheProvider(), new FileCacheProvider(directory));

 

//Specify UserName and LicenseKey for Licensed Mode

config.UserName = "my user name";

config.LicenseKey = "my license key";

 

//Instantiate the cache

SmartCache cache = new SmartCache(config);