NCache 4.6 - Online Documentation

Configuring Cache Startup 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. Once it is enabled, other options will also be enabled.
  • Click on the‘…’ button against Library Name to select the assembly implementing ICacheLoader interface.
  • Browse for the required assembly and click Open after selecting the required assembly.
  • Name of the selected assembly will appear in Assembly Name and any classes implementing interface will be listed down in Class Name list box in 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.
Specifying parameters is optional. It is only required if your implementation of ICacheLoader requires parameter(s) during initialization.
  • For clustered topology, you can specify the distribution hints by checking the checkbox Run startup loader on multiple nodes.
  • Click on New and enter any string to differentiate the hints. Click OK.
  • The number of hints should be preferably greater than the number of nodes to allow even distribution.
  • You can specify if you want NCache to perform any failed operation again before proceeding to the next operation. Set the No. of Retries according to your requirements.
  • Similarly, you can specify the Retry Interval between each attempt to perform the failed operation again.
  • Once the configurations have been made, click on Deploy Cache Loader to copy the cache loader assemblies to all nodes.
  • Right click on the cache name in Cache Explorer and select Apply Configuration option.
Using Command Line Tool
  • Open command prompt with administrative privileges.
  • Go to the NCache tools directory: cd %NCHOME%/bin/tools
  • Use the addstartuploader.exe tool, provide the required information:
addstartuploader democache /a F:\CacheLoader\ProductLoader.dll /c CacheLoader.ProductLoader
  • Press ENTER. ProductLoader is added as cache startup loader on democache.
  • Deploy all  required assemblies using deployprovider.exe. Use following command on command prompt:
deployprovider democache /T F:\CacheLoader\ProductLoader.dll
  • Press ENTER, it will deploy all of the assemblies from the given path to the NCache.
See Also