When working with a dashboard, you don’t necessarily need to refresh your data every time you make a change in a widget. In fact, it can be annoyingly time-consuming to wait for the data to update from the server every time. The data cache feature in Bold BI® helps you keep your dashboard data in temporary, low-maintenance storage to retrieve results faster. Storing your dashboard’s information in a cache allows you to perform analytical queries directly and quickly. In this blog, I will give you a walkthrough of the Bold BI data cache:
- What is the data cache in Bold BI?
- How to configure the Bold BI data cache
- How to turn data caching on
- FAQs
What is the data cache in Bold BI?
The Bold BI data cache is a feature that allows the dashboard creators to store the results of each widget in their dashboards for a set period of time. It keeps the information about each dashboard widget inside a configured memory the first time the dashboard loads. The dashboard then retrieves the data from the cache, without hitting the actual data server for every action, thus improving the user experience with a faster dashboard loading time.
How to configure the Bold BI data cache
To configure the data cache in Bold BI, you first need to choose where the widget data will be stored. You can store your dashboard data either in-memory or in the external server, Redis
In-memory
In-memory is the default cache mode in Bold BI . Bold BI stores the data to be cached directly in the system’s memory (RAM) for fast retrieving of data in in-memory mode. So it is not recommended, since it may affect the system’s performance when we use a large amount of data.
Redis
Redis is a dedicated high-speed in-memory cache system, which is used to store and retrieve data quickly. Bold BI uses Redis as a cache memory to load dashboards faster. To utilize Redis in Bold BI, you need to rely only on an external Redis server. You will need to configure the Redis server and provide the connection string in the RedisCacheConnectionString property in appsettings.json.
To learn more about Redis, visit their official website.
The Bold BI team is working on writing a built-in storage system to be available in our future releases. With it, you will be able to configure the cache mode in the appsettings.json, which will be available in BoldServices\bi\dataservice. Later, we intend to provide these options in the UI.
To configure the data cache, follow these steps:
- Click the json file in the BoldServices\bi\dataservice, as shown in the following image.
- Edit the appsettings.json to change the CacheMode property, as shown in the following code.
How to turn data caching on
To turn your data cache on:
- Click the data cache icon, as shown in the following image.
- By default, the cache is in the OFF You need to turn it ON to make it work.
- Then, configure the time span for the cache. The default is 30 minutes, but it can be set for up to 60. The cache will be cleared automatically after that set amount of time.
Example
Consider a scenario where you have a large dashboard that takes about 2.5 minutes to load. Each dashboard data request in the network will take approximately 1.2 seconds to fully process, as shown in the following image.
When this dashboard data is stored in a cache, the loading process will speed up, thereby reducing the response time of the dashboard results to 25 seconds. In the following image, you will see that the same dashboard takes 5 minutes less to reload its results.
FAQs
Here, I will provide answers to common questions about data caching in Bold BI.
Why is in-memory not recommended for caching?
The in-memory mode is not recommended for use in cache because it uses the system’s actual resources to store the cached data, which can affect the system’s performance. It’s only good to use when there are a minimal number of dashboards and widgets.
Why are cache configurations kept in appsettings.json?
Cache configurations are usually kept in appsettings.json because the data cache feature is still under development. We are working on configuring cache settings in the UI, which will be available in our upcoming release.
Should I restart the service after changing configurations in appsettings.json?
Yes.
Should I purchase a Redis license?
Yes. Though Redis is open source, it cannot be distributed for commercial purposes for free and therefore, you need to purchase a license to use it. For more information about Redis licensing, please refer to the official Redis website.
For how long should data be kept in the cache?
Data in the cache is kept only for the set amount of time, up to an hour.
How do I see live data if the data is cached?
To see live data, click Refresh from the menu in the toolbar. This will clear the data in the cache and store the newer data.
If the cache mode is switched, the data will automatically be cleared from the cache.
Check out our data cache documentation for more details on configuring the data cache.
Conclusion
A data cache speeds up dashboard loading. With a data cache, you can temporarily store a dashboard’s data to retrieve its results faster. Now that you have a better understanding of data caching in Bold BI® and how it can benefit you, try deploying it in your application to improve your dashboard performance.
If you have any questions on this blog, please feel free to post them in the following comment section. Get started with Bold BI by signing up for a free trial and create more interactive business intelligence dashboards. You can also contact us by submitting your questions through the Bold BI website or, if you already have an account, you can log in to submit your support question.


Top comments (0)