Configure the Cache Settings for the Historian Tags

About this task

The Analysis application supports the caching and refreshing of the cached Historian tags after certain time interval. You configure the duration of the saved cached Historian tags in the application.properties file of the mes-dataservice-impl and processanalyzer-service-impl microservices for the Analysis application. After the set duration, the Historian tags are cached again.

Procedure

  1. In the directory <tomcat_home>/Apache Software Foundation/Tomcat 9.0/webapps/mes-dataservice-impl-<version>/WEB-INF/classes, access the application.properties file by using a text editor. Where:
    • <tomcat_home>: Is the directory where you installed Apache Tomcat. For example, C:/Program Files.
    • <version>: Is the version of the mes-dataservice-impl microservice created during the installation of the Plant Applications Web Client. For example, 0.6.2.
  2. Enter the properties and their details as described in the following table.
    PropertyDescription
    historianTagMaxCacheSizeEnter the maximum cache size in KB. The default value is 50000.

    Example: historianTagMaxCacheSize=50000

    historianTagCacheTimeOutEnter the duration in the format duration<timeformat> after which the cached Historian tags are cleared by the mes-dataservice-impl microservice. Where: <timeformat> is h, m, or s to indicate time in hours, minutes, or seconds, respectively. The default value is 6h.

    Example: historianTagCacheTimeOut=6h

    scheduler.tagcaching.secondsEnter the duration in seconds after which the Historian tags are cached again by the mes-dataservice-impl microservice. The default value is 21600.

    Example: scheduler.tagcaching.seconds=21600

    Note: The value you enter for the historianTagCacheTimeOut and scheduler.tagcaching.seconds properties must of the same duration you enter for the tagVariableCacheTimeOut property in the processanalyzer-service-impl microservice.
  3. Save the changes to your file.
  4. In the directory <tomcat_home>/Apache Software Foundation/Tomcat 9.0/webapps/processanalyzer-service-impl-<version>/WEB-INF/classes, access the application.properties file by using a text editor. Where:
    • <tomcat_home>: Is the directory where you installed Apache Tomcat. For example, C:/Program Files.
    • <version>: Is the version of the processanalyzer-service-impl microservice created during the installation of the Plant Applications Web Client. For example, 0.6.2.
  5. For the tagVariableCacheTimeOut property, enter the duration in the format duration<timeformat> after which the tags are cached again. Where: <timeformat> is h, m, or s to indicate time in hours, minutes, or seconds, respectively. The default value is 6h. Example: tagVariableCacheTimeOut=6h
    Note: The value you enter for the tagVariableCacheTimeOut property must be of the same duration you enter for the historianTagCacheTimeOut and scheduler.tagcaching.seconds properties in the mes-dataservice-impl microservice.
  6. Save the changes to your file.
  7. Restart Tomcat to apply the changes.

Results

The cached tags are refreshed after the duration you set in the application.properties file of the mes-dataservice-impl and processanalyzer-service-impl microservices for the Analysis application.