Refresh Dataset
To ensure that data loaded into the cache via the Cache Loader remains synchronized with updates from the data source, NCache provides a Cache Refresher feature. This feature allows you to schedule refresh intervals to keep the cached data up to date. Additionally, NCache offers the flexibility to manually refresh datasets as needed. You can manage these refresh operations through the NCache Management Center or PowerShell.
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.
Important
Make sure the cache is stopped before making any configuration changes.
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.
Select the cache name and 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 tool 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/refreshpreference
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.
- The following command refreshes the dataset product immediately on demoCache on server 20.200.20.40.
Invoke-RefresherDataset -CacheName demoCache -Server 20.200.20.40 -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.40 -Dataset product -RefreshPreference RefreshOnNextTimeOfDay
See Also
Configure Cache Loader and Refresher
Management Operations
Cache Settings