Refresh Dataset
The data that loads into the cache using the Cache Loader needs to be synced with the updated data from the data source. For this, the datasets must be scheduled for refreshing. Besides the scheduled refresh interval, NCache allows the user to manually refresh a pre-configured dataset at runtime when desired.
This can be done either through the NCache Management Center or the PowerShell cmdlet.
Prerequisites
- Make sure that the Cache Loader and Refresher are successfully configured and deployed using the NCache Management Center or PowerShell cmdlet and cache is running.
Using the NCache Management Center
Launch the NCache Management Center by browsing to http://localhost:8251 or
<server-ip>:8251
on Windows and Linux.In the left navigation bar, click on Clustered Caches or Local Caches, based on the cache you want to create.
Against the cache name, click on View Details.
- This opens the detailed configuration page for the cache. Go to the Advanced Settings tab and click on Cache Loader/Refresher in the left bar. Under the Datasets section click on the Refresh Now option. You will receive a success notification if the refresher is successfully invoked.
Note
The invoke refresher option is enabled when the cache is running.
Using Command Line Tools
The Invoke Refresher Dataset tools enables the user to refresh a pre-configured dataset at runtime. The user can either refresh their datasets immediately or within the next 24 hours using the RefreshPreference/refresh-preference
option of this cmdlet. However, if all the nodes are busy refreshing other datasets, then the new datasets are refreshed in the refresh interval when any node is available.
Examples
- The following command refreshes the dataset product immediately on demoCache on server 20.200.20.39.
Invoke-RefresherDataset -CacheName demoCache -Server 20.200.20.39 -Dataset product -RefreshPreference RefreshNow
- This command refreshes the dataset product at the configured time of the dataset on demoCache within the next 24 hours. If the dataset specified will be a load-only, its preference will be treated the same as
RefreshNow
.
Invoke-RefresherDataset -CacheName demoCache -Server 20.200.20.39 -Dataset product -RefreshPreference RefreshOnNextTimeOfDay
See Also
Configure Cache Startup Loader and Refresher
Management Operations
Cache Settings