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 icon
will be shown near the dashboard title which indicates that the Data Cache
is in the ON
state. When hovering over the icon, it displays the message about cache information.
NOTE: Data Cache info icon is enabled only, when Data Cache is ON.
When Data Cache
is enabled, data will be retrieved from the cache. If you want to get data from the live data from the data server, use the Refresh
option from the menu in preview or view mode. When refreshing the dashboard from the Refresh
option from the menu, it will get the data from the data server and store them in a cache. You can find the 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:
Give the above highlighted port
number of the Redis server in the RedisConnectionString
property of the appsettings.json
file through the file location below:
{Deployed Location}\bi\dataservice\appsettings.json
By default, the Redis is deployed in C:\BoldServices
for Windows and /var/www/bold-services/application
for Linux.
Mode Selection
is needed for which CacheMode
, the widget data will be cached. Mode should be either inmemory
or redis
.
Follow these steps to select the mode:
Go to the file location below:
{Deployed Location}\bi\dataservice\appsettings.json
By default, the Redis is deployed in C:\BoldServices
for Windows and /var/www/bold-services/application
for Linux.
Edit the appsettings.json
file, you can find the CacheMode
property as shown in the following image:
The default cache mode is inmemory
, you can choose inmemory
or redis
mode as per your need. If you choose Redis, do ensure your Redis server was in the ON
state.
NOTE: Cache mode should be case sensitive such as inmemory and redis.