I. Overview
1. Version
| Rreport server version |
|---|
| 11.0 |
2. Application scenarios
For report execution speed, data source fetching performance is a link that has a greater impact.
If the real-time data requirements are not high and the update frequency of about half an hour is acceptable, using cache is a solution that can not only reduce the pressure on the server and database, but also improve the execution speed of the report.
3. Function introduction
Extracted Data Cachecaches the results of dataset query. When the same query is performed again, there is no need to connect to the database to query the data again, and the cache can be used directly to achieve resource reuse, reduce the fetch time and improve the presentation speed of the report. At the same time, by regularly extracting and updating the cached data, the accuracy of the data is improved.
II. Compare the advantages of shared datasets
| Extracted Data Cache | Shared dataset |
|---|---|
| Support accurate recommendation cache applicable templates, batch one-click open cache | Each dataset needs to be opened separately to identify the appropriate template by itself |
| Support custom configuration of resource occupancy, limit maximum resource occupancy, and cut off the impact on other system services | Only the number of caches can be set, and the memory and disk usage is uncontrollable, which may affect business usage |
| Support real-time monitoring of cache resource occupancy and accessN | not support |
Support the user toolbar to display the data update time and manually obtain the latest data Support administrators to manually stop cache updates or update the latest data immediately | Not supported, you need to wait until the timeout expires automatically |
| Supports scheduled updates to ensure that the cache is always extended and new data is fetched regularly | Not supported, access is regenerated after timeout expires |
| Supports linkage with the reporting function of the report itself, and automatically invalidates the cache related to the reporting after filling. | Not supported, the relevant data in the cache remains unchanged after filling the report, which may cause data inconsistency. |
| Caches that are not commonly used or occupy a lot of resources will automatically limit the cache or stop the automatic update directly. When the cache is detected to be active, it will enter the automatic update cache state again. | Only supportedRecently Used,least used,first in first outThree Simple Strategies |
III. Operation steps
Enter the platform as an administrator, click Manage > Extracted Data Cache, the interface is as shown below:

1. Cache Template Management
1) Cache Template Recommendation
First use the Cache Template Management function to detect templates suitable for enabling caching.
After clicking Start analysis, it will analyze the historical operating data of the system and recommend templates that may be suitable for caching. As shown below:


2) CacheTemplate Management
Users can add and delete templates with caching enabled here.
2. Cache Config
In the cache config page, you can set the cache of the server, as shown in the following figure:

The description of each setting item is shown in the following table:
| Setting item | Instruction |
|---|---|
| Enable Cache | For the template that sets the cache, the result of the dataset query will be cached after it is enabled. |
| Display Cache Prompt | It is used to set whether to display the cache prompt on the toolbar of template preview (it will not be displayed if there is no toolbar), including the manual update data button and the cache generation time. Users update the data as soon as they feel that the data is inaccurate, as shown in the following figure:
|
| Template Cache Reminder | After it is enabled, the user will be notified of templates suitable for enabling caching in the following ways: 1) Platform news
2) When a user first enters the Extracted Data Cache page of the platform that day, the tooltips at the top of the page prompt:Using the cache for 15 templates in the system will improve performance, please go to the cache template management to view and enable
At the same time, the Cache Template Management page prompts:Accurately recommend X sheets, click to view
|
| Parametric Prediction | When enabled, the parameter usage of the template will be predicted and cached in advance, thereby optimizing the loading performance |
| Cache Memory Space Limit | Used to limit the maximum amount of server memory space occupied by the cache |
| Cache Update Rules | Simple repetition:
Updates are performed according to the set frequency, and the Cache rules are automatically optimized can be enabled. After it is enabled, the cache update interval will be dynamically adjusted within a reasonable range to avoid simultaneous updates of a large number of caches. Set by expression:
CRON expressions can be entered (such as0 0 12 * * ?means 12:00 noon every day) |
| Always Reread Report | Refers to whether the content of the cpt or frm file is cached to memory For all templates, the template file will be cached when it is not enabled; after it is enabled, the template will be re-read every time |
Note: Since the cache is mainly used to improve the performance of data retrieval, caching a large amount of data will cause the server resources to be strained. Therefore, the maximum amount of cached data is currently limited to 500,000 (row*column).
3. Running Monitor
If you have a request for understanding the usage of the cache, or if you want to manually handle some abnormal caches, you can enterRunning Monitorin the Management > Extraction Date Cachedirectory.
For details, please refer to: Cache Running Monitor
4. Dataset separate cache settings
There may be some templates in the system whose data update time is different from that of most other templates. It is not suitable to use a unified setting for extracted data cache. In this case, you can set a separate cache setting for the corresponding dataset.
In the dataset edit panel, the new cache settings will be displayed in place of the original shared dataset.
1) When using the server settings, the default cache policy of the server will be used, and you can see whether the corresponding cache policy and cache are enabled by default, but are not allowed to be modified. As shown below:

2) When it is set separately for this dataset, it is allowed to set whether to use cache and Strategy Config for this dataset. As shown below:

After clicking Strategy Config, you can customize the cache strategy config. As shown below:

3) For templates with many datasets, it takes time to modify the cache settings one by one. You can quickly turn it on/off through the buttons on the dataset toolbar. As shown below:

Clicking
button will batch modify the dataset of the current template as a separate setting, and enable the cache.
Clicking
button will batch modify the dataset of the current template as a separate setting, and close the cache.
IV. Example Scenario
Large screen/cockpit scenarios often need to analyze multiple indicators at the same time. There may be a large amount of SQL in a template. Even if the time-consuming of each SQL is not high, the SQL of a dozen or more indicators will take time to accumulate. This will cause the entire page to take a long time to load.
If these SQLs are more complex, the overall large screen/cockpit preview will take longer. Such pages are often used by leaders and management, and their performance requirements will be more stringent.
Parallel fetching is an optimization method, but only a part of the fetching performance can be optimized due to factors such as the order of fetching and thread restrictions. You can directly open the extracted data cache for the corresponding template of the large screen/cockpit, and cache all the numbers in the template to ensure the loading speed of the large screen/cockpit.