Configure and Deploy Loader/Refresher
Once you have implemented the ICacheLoader interface, you need to register, schedule, and deploy your custom provider assembly to the cache cluster. NCache runs these providers in an isolated, server-side execution process.
For step-by-step administrative instructions, configuration files, and troubleshooting, refer to the complete guide on Configure Cache Loader and Refresher docs.
Deployment Workflow
To get your custom implementation running on the cache server, follow this workflow:
1. Build and Prepare Assemblies
- Compile your custom provider class library.
- Ensure your target deployment includes the main assembly (DLL) and any external third-party dependencies required by your code.
- Verify that all custom data objects returned from your data source are marked as [Serializable].
2. Configure & Schedule
You can map your datasets and runtime parameters using either the NCache Management Center or PowerShell Cmdlets:
Through NCache Management Center
- Navigate to Clustered Caches -> View Details -> Advanced Settings -> Cache Loader/Refresher.
- Enable the feature, provide the fully qualified Class Name and Provider Name, and configure optional argument strings.
- Register your distinct Datasets and assign them an execution schedule (Interval, Daily, Weekly, or Monthly).
Through PowerShell
- Bind the implementation using Add-StartupLoader.
- Register parallel processing datasets using Add-LoaderDataset.
3. Deploy Assemblies to the Cluster
Your custom code must be physically deployed to all cache nodes to be accessible by the NCache server process:
- NCache Management Center Method: Click Deploy Cache Loader at the bottom of the Cache Loader/Refresher configuration tab to automatically upload and distribute your assemblies.
- Manual Method: Stop the cache and manually copy the assemblies into the NCache deployment directory across all nodes.
Important
Any time you update or modify your ICacheLoader source code, you must re-compile and re-deploy the updated assembly to the cluster for changes to take effect.