Configure Cache Startup Loader
Note
This feature is only available in NCache Enterprise Edition.
Cache startup loader can be configured in following ways:
Using NCache Web Manager
Important
Make sure that the Loader Service is running and the firewall is disabled.
Launch NCache Web Manager by browsing to
http://localhost:8251
(Windows) or<server-ip>:8251
(Windows + Linux).In the left navigation bar, click on Clustered Caches or Local Caches, based on the cache to configure.
Against the cache name, click on View Details.
Note
Make sure that the cache is stopped.
This opens up the detailed configuration page for the cache. Go to the Advanced Settings tab and click on Cache Loader in the left bar.
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 Assembly Name to select the assembly implementing
ICacheLoader
interface.
Name of the selected assembly will appear in Assembly Name and any classes implementing interface will be listed down in Class Name list box.
Select the required class.
You can also add the parameters for your cache loader implementation, if required.
Provide the Parameter name and Value and click on + to add the parameters. These will be displayed in the box with option to remove the parameter.
Note
Specifying parameters is optional. It is only required if your implementation of ICacheLoader requires parameter(s) during initialization.
For clustered caches, you can specify the distribution hints by checking the checkbox Run startup loader on multiple nodes.
Specify the hint and click on + to add it to the Distribution Hints table. 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.
Click on Save Changes to apply this configuration to the cache.
Using 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 demoClusteredCache.
Add-StartupLoader demoClusteredCache -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 demoClusteredCache using the default port.
Remove-StartupLoader –CacheName demoClusteredCache
See Also
Register Classes for Portable Data Sharing
Register Classes for Compact Serialization
Compression
MapReduce