Data Cache allows you to improve the dashboard performance by caching the result of each widget and keeping the cached data in a dashboard for a particular amount of time. When the Data Cache is ON
, it stores widget data during the first dashboard rendering time and it will fetch the data from the cache without hitting the actual data server for the next dashboard load. Hence, it reduces widgets’ loading time and performance hit in the data server.
Data Cache can be configured by using the Data Cache Settings
dialog which is opened by clicking the Data Cache
icon from the toolbar.
By clicking the Data Cache
icon, the Data Cache Settings
dialog will be opened as follows:
Click Apply
button to save the data cache configuration.
Data Cache Settings
dialog has two states as follows:
The OFF state cannot store the data of a widget. You can enable it when there is no need for caching data.
The ON state caching widget data and the cached result will be applied in the rendering of the dashboard. The Data Cache has an expiration time of up to 60 minutes and the default time is set as 30 minutes.
After Data Cache
is enabled, when opening the dashboard in view mode, the Data Cache refresh time
will be shown in the nearby dashboard theme, which indicates that the Data Cache
is in the ON
state.
The data cache refresh time represents when the data fetch live data from the data server. It will be displayed based on the user’s browser time zone. We can disable the refresh time by unchecking the Display refresh time option in Cache configuration.
NOTE: By default the Display refresh time option is enabled.
When Data Cache
is enabled, data will be retrieved from the cache. If you want to get live data from the data server, use the Clear cache and refresh
option from the toolbar in view mode. When refreshing the dashboard from the Clear cache and refresh
option from the toolbar, it will get the data from the data server and store them in a cache. You can find the Clear cache and refresh option as shown in the following image:
Data cache can be achieved through two modes:
The In-Memory
is the default cache memory for dashboards. It stores the data in the internal cache storage. You should configure the CacheMode
property for the inmemory
mode selection. Please find more details about Mode Selection.
Data is cached in an external server named Redis
. Redis is an open source (BSD licensed), in-memory data structure store used as a database, cache, message broker, and streaming engine. Learn more about Redis
and it’s installation here.
After installation, you should start the Redis server as shown in the following image:
Mode should be either inmemory
or redis
, the widget data will be cached based on the selected mode.
Go to the Data Process
settings on the server page and select the Data Cache Configuration
tab.
In Redis
mode, you can find the connection string and test connection options. It’ll help to check whether it is a valid connection string or not.
We have provided data refreshed time in the dashboard view page, and you can also disable the data refreshed time by clicking the checkbox.
By clicking the clear cache option, all dashboard cached memory should be cleared when the data cache is in an ON state.
NOTE:
Clear cache
option is visible only when data is available in cache.