BackPrevious Page Next PageNext

Configuring Cache

On the JReport Administration > Cache page, administrators can configure the following cache settings of JReport Server:

Configuring data cache

The JReport data cache system allows for caching the dataset of a report automatically when the report runs, as well as scheduling and caching the data result without actually running a report. When an end user selects a report that is linked to a cached result set, the data is retrieved from the cache and not from the DBMS. See Managing Cached Report Data for detailed information.

Configuring report cache

To improve performance, JReport Server enables you to cache reports and catalogs into memory so that they do not have to be loaded from disk when they are required. The cached catalogs and reports will be cleared from memory when JReport Server restarts.

To configure the report cache of JReport Server:

  1. On the JReport Administration page, click Cache on the system toolbar and then select Report Cache from the drop-down menu to open the Cache - Report Cache page.

    Configure Report Cache

  2. Check Cache Loaded Catalogs if you want to keep catalogs in memory after the reports using them are generated. If this option is unchecked, after a report is generated, the catalog used to generate it will be removed from memory. However, when a report runs in Page Report Studio, its catalog will not be cached even when this option is checked.
  3. In the Maximum Number of Catalogs to Be Cached text box, specify the maximum number of catalogs that can be cached by the server in its memory. No more catalogs can be cached if this amount is reached.
  4. The Cached Catalogs box lists the currently cached catalogs with their file path in the server resource tree and catalog version number.

    To add a new catalog to the list of catalogs to be cached, click the Add button. In the displayed dialog, select the catalog you want to cache and its catalog version.

    To remove a cached catalog, select it in the Cached Catalogs box, then click Remove.

  5. Check Cache Loaded Reports to keep reports in memory after they are generated. If this options is unchecked, after a report is generated JReport will remove it from memory.
  6. In the Maximum Number of Reports to Be Cached text box, specify the maximum number of reports that can be cached by the server in its memory. No more reports can be cached if this amount is reached.

    Each cached report will use some heap memory. If the heap is used up, an OutOfMemoryException will be thrown. In JRServer.bat/sh the -Xms setting specifies the initial heap and -Xmx specifies the maximum heap. For example, -Xms256m -Xmx1024m means that the initial heap is 256MB and the maximum heap is 1024MB. You can refer to the documents of the Java VM for more information.

    Here is an example, the accuracy depends on your OS and VM:

    Cache Size Heap Size Required
    10 reports 16M
    30 reports 25M

    The default cache size is 10 reports and the default maximum heap space is 1024MB. When you adjust the number, you should adjust the heap accordingly. The larger the heap space, the better the performance provided enough physical memory is available.

  7. The Cached Reports box lists the currently cached reports with their file path in the server resource tree and report version number.

    To add a new report to the list of reports to be cached, click the Add button. In the displayed dialog, select the report you want to cache and its report version.

    To remove a cached report, select it in the Cached Reports box, then click Remove.

  8. Specify the buffer size for the sort action on page reports as required. Any change to the buffer size takes effect immediately. This setting is not available to organization admin.
  9. Click Save to apply the cache configuration.

Configuring security cache

The security cache system temporarily stores security objects such as users, roles, groups and ACLs. For detailed information, see Security Cache System.

Configuring image cache

Image cache allows you to cache images used in reports and dashboards so that they do not have to be loaded from disk when they are required. The cached images will be cleared from memory when JReport Server restarts.

To configure the image cache of JReport Server:

  1. On the JReport Administration page, click Cache on the system toolbar and then select Image Cache from the drop-down menu to open the Cache - Image Cache page.

    Configure Image Cache

  2. Check the Cache Images checkbox to enable image cache.
  3. Specify how to cache the images.
  4. To view the detailed information of the cached images, check Show Details. The cached image table displays with the following columns:
    Column Description
    Name Displays the name of the image.
    Size Displays the size of the image file.
    Catalog Displays the catalog file in which the image file is.
    Path Displays the path of the cached image in the server resource tree.
    Locked Displays the lock status of the image file.

    You can edit the cached images in the table as follows.

  5. Click Save to apply the cache configuration.

BackPrevious Page Next PageNext