Overview
Version
FineBI Version | Functional Change |
6.0 | / |
Application Scenario
The table with the FineBI direct connection attribute clear the cache once and resend the SQL statement to its corresponding database to retrieve the latest data every 600 seconds, so the data in that table is refreshed once every 600 seconds.
This document introduces how to set the cache for a specific table to reduce the query pressure on the database. Tables with the high real-time requirement will be refreshed faster, while tables with the low real-time requirement will be refreshed slower.
For example, the data table with the low real-time requirement can be configured to automatically initiate a query to its corresponding database at 8:00 every day, and the data obtained from the database at 8:00 will be used throughout the day until the next day when a new SQL statement query is sent to the database to obtain the latest data.
Function Description
The cache setting is specific to versions with the direct connection.
This document introduces how to set the cache for a single table. If you want to set the global cache, you can refer to BI Cache.
Only when you have the management permissions of data tables can you perform Cache Setting. For details, you can refer to Overview of Data Permission.
Procedure
Customizing the Cache Strategy
Set the cache strategy of a table with the direct connection attribute to automatically query the data once from the data's corresponding database at 8:00 every day.
1. Click a dataset with the direct connection attribute (The dataset marked with a dash has the direct connection attribute.), click Cache Setting, and click the Edit button, as shown in the following figure.
By default, the Cache Strategy for a single table is Follow Global Cache Strategy.
If you want to modify the global cache time, you can modify the parameter of cache time in BI/Spider Parameter.
2. Modify the Cache Strategy as Customize Cache Strategy, configure clearing the cache once at 8:00 every day, and then send a query to the database to obtain the latest data.
No Cache (Real-Time Query): The data table will query the database for the latest data in real time, but is easy to visit duplicate data. (Visiting duplicate data may affect the performance.)
Every xxx Second Clear Cache Once: You can set the interval time for clearing the cache by entering any integer between 0 and 86400.
Every xxx Time Clear Cache Once: You can set fixed time to clear the cache.
3. After you click OK, you can see that the cache strategy of this dataset has been modified to clear the cache once at 8:00 every day.
Clearing the Cache Immediately
If you want to immediately obtain the latest data, you can click Clear Cache At Once. The system will automatically clear the cache and request the latest data from the database.