NCache 4.6 - 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 appear in Assembly Name and its classes implementing the 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
  • Press ENTER, it will add Loader1 as startup loader on demoLocalCache.
  • Now deploy 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\
  • Press ENTER, it will deploy all of the assemblies from the given path to NCache deploy folder.
See Also