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 implementation of ICacheLoader requires parameter(s) during initialization.
- Click OK
- 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 Windows PowerShell
Add Startup Loader
Add-StartupLoader
cmdlet enables the users to configure startup loader provider for the cache which loads the configured data types from data source to the cache whenever the cache will be started.
The following command adds ProductLoader as cache startup loader on demoLocalcache.
Add-StartupLoader demoLocalCache -AssemblyPath F:\CacheLoader\ProductLoader.dll -Class CacheLoader.ProductLoader -HintList hint1,hint2,hint3
Remove Startup Loader
Remove-StartupLoader
cmdlet enables the users to remove pre-configured start up loader provider of the specified cache.
The following command removes startup loader for the cache named demoCache using the default port.
Remove-StartupLoader –CacheName demoCache
See Also
Register Classes for Portable Data Sharing
Register Classes for Compact Serialization
Compression
MapReduce