NCache 4.4 - Online Documentation

Configuring Cache Start-Up Loader

 
NCache supports cache start-up loader through which a user can preload the cache with given data at the time of cache start-up. This feature can be configured in the following ways:
 
Using NCache Manager
 
  • Click on the cache name in Cache Explorer to open cache settings.
  • Go to the Cache Loader tab.
 
 
  • Check Enable Cache Startup Loader check box to enable it. After enabling it, other options will get enabled as well.
 
 
 
  • Click on the ‘…’ button to select the assembly implementing ICacheLoader interface.
 
 
  • Browse for the required assembly and click Open after selecting the required assembly.
  • Name of selected assembly will be appeared in Assembly Name and its classes implementing interface will be listed down in Class Name list box at Cache Loader tab. Select the required class
 
 
  • You can also add the parameters for your cache loader implementation, if required. Click New; provide the Parameter Name and Parameter Value in the New Parameter dialog box.
 
 
  • Deploy the required assemblies using Deploy Cache Loader button at the lower left corner of Cache Loader tab. Browse for the required assemblies and select Open.
 
 
  • Right click the cache in Cache Explorer and select Apply Configuration option.
 
 
 
Using Command Line Tool
 
  • Open command prompt
  • Go to the NCache tools directory: cd %NCHOME%/bin/tools
  • Use addstartuploader.exe tool, provide the required information as:
addstartuploader demoLocalCache /a C:\Downloads\Providers.dll/cNCache.Sample.Providers.Loaders.Loader1
  • Hit ENTER key, it will add Loader1 as startup loader on demoLocalCache.
  • Now depoly all of the required assemblies (assembly in which you have implemented the write-through provider and all of its dependency assemblies) using deployprovider.exe. Use following command on command prompt:
deployprovider demoLocalCache /T C:\Users\Administrator\Downloads\Providers\
  • Hit ENTER key, it will deploy all of the assemblies from the given path to NCache deploy folder.
 
See Also