On this page:
Introduction
The CAST dashboards feature a data cache to improve the speed at which data is displayed. This means that when requesting data, the dashboard may return data direct from the cache rather than fetching it from the Measurement or Dashboard Service. In turn, this means that data displayed in the dashboard may not be up-to-date. This is particularly true in the following situations:
- if you have very recently generated a snapshot and were expecting to see this new data
- if you have run a manual consolidation with GUI/CLI admin tools
- if you have run a manual consolidation with GUI/CLI admin tools
- if you have deleted an existing snapshot
To see the new data, you can manually force the cache to reload data from the Measurement or Dashboard Service, rather than waiting for it to do so automatically.
Via the RestAPI interface
Browse to the following URL replacing server/port/dashboard with the details of your environment:
http://server[:port]/dashboard/static/default.html
if you are already logged in, click the Test button to ensure you have an active session:
You will get a response as follows:
Logged in | Not logged in |
---|---|
If you are "logged in" you can proceed as below, otherwise, enter your user name and password and then click Login:
Once logged in expand the Help section and click the Reload server memory cache button:
The cache will then be reloaded with the most up-to-date data from the Measurement Service.
Via a command line for automation
You can also reload the cache via a command line - this enables you to automate the process if you are using CAST's command line interface to automate an analysis, snapshot generation and upload of data to the Measurement Service. You can use a tool such as cURL to do so, for example, replacing server/port/dashboard with the details of your environment. Optionally, this command line can then be added to a batch file containing the command lines required for generating a snapshot.
curl http://server:[port]/<dashboard>/rest/server/reload -u admin:cast -H "Accept: application/json"
Using an API Key
If you have enabled SAML authentication mode for your CAST Dashboard/RestAPI deployment, then in ≥ 1.11.0 of the CAST Dashboard Package, an API Key feature has been introduced. You will need to use the API Key instead of a password when using curl for automated actions. To do, so modify the command line as follows:
- X-API-KEY: the API Key matching the key defined in the security.properties file
- X-API-USER: a defined user name to obtain a CAST dashboard/RestAPI role and data authorization
curl https://localhost:8080/RestAPI/rest/server/reload -H "X-API-KEY: G]MauT-9/*<dev8r" -H "X-API-USER: admin"
When server cache is reloading
While the server reloads from cache there will be a message in the login page, as shown in the below screen, stating "SERVER CACHE IS REFRESHING. PLEASE WAIT..."
If the user is already logged in, a pop-up message will appear, as shown in the below screen, and block the user activity on dashboard until the server is getting refreshed.