Successfully!

Error!

Specifying the Ehcache Cache Path

  • Last update:  2024-01-26
  • Overview

    Problem

    The .FineReport110 folder, in which all files are generated by the server, exists in the root directory of the system.

    In this folder, the ./ehcache_disk_store file occupies a large space, causing the capacity of the root directory to be easily reached. This document introduces how to modify the storage path of the ./ehcache_disk_store file.

     1.png

    Implementation Method

    The ./ehcache_disk_store file contains two types of cache files: database level-2 cache files and file server cache files.

    You need to separately modify the paths of two types of cache files, rather than directly modify the path of ./ehcache_disk_store.

    Operation Method

    Modification of the Database Level-2 Cache Path

    1. Create a file named ehcache.db.properties in the WEB-INF/config folder of the project directory.

    Configurations related to the database level-2 cache path are shown in the boxed part of the following figure. You can modify values as needed.

    You can download and unzip the sample file ehcache.db.zip.

    2. The path takes effect after you restart the project. The original file can be discarded and manually deleted.

     2.png

    Modification of the File Server Cache Path

    Add the following two fields to the fine_conf_entity table in FineDB.

    Field
    Value

    ResourceCacheConfig.persistenceStrategy

    LOCALTEMPSWAP

    ResourceCacheManagerConfig.diskStorePath

    diskStore=C:\\Users\\root\\Desktop\\tmp\\resource_cache


    Attachment List


    Theme: Performance Optimization
    Already the First
    Already the Last
    • Helpful
    • Not helpful
    • Only read

    Doc Feedback