Configuring Cache Start-Up Loader
Cache start-up loader can be configured in following ways:
Using NCache Manager
Important
Make sure that the Loader Service is running and the firewall is disabled.
Click on the cache name in Cache Explorer to open the cache settings.
Go to the Cache Loader tab.
Check the 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.
Note
Specifying parameters is optional. It is only required if your implemention 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 [InstallDir]/bin/tools
.Use the
addstaruploader.exe
tool, and provide the required information:
addstartuploader democache /a F:\CacheLoader\ProductLoader.dll /c CacheLoader.ProductLoader /h hint1,hint2,hint3
ProductLoader is added as cache startup loader on democache.
Deploy required assemblies using
deployprovider.exe.
Use following command on Command Prompt:
deployprovider democache /T F:\CacheLoader\ProductLoader.dll
- This will deploy all assemblies from the given path to NCache.