Configure the Cache Settings for the Plant Applications Services

About this task

The Plant Applications supports the caching and refreshing of the cached Plant Applications services after a certain time interval. You can configure the duration of the saved cached services in the application.properties file of the respective Plant Applications services. After the set duration, the services are cached again.
Note: Perform this task only if you want to get the updated information from the Plant Applications Server before the cache expiry time.

Procedure

  1. Docker Installation: In the directory <Installation_Directory>/PlantApplicationsDocker/plantapps-web-docker, access the env.yml file by using the vi editor.
  2. Non-Docker Installation: In the directory <tomcat_home>/Apache Software Foundation/Tomcat 9.0/webapps/<service_name><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.
    • <service_name>: Is the service for which you want to modify the default cache properties.
    • <version>: Is the version of the microservice created during the installation of the Plant Applications Web Client.
  3. Below is the list of cache properties with default values pertaining to the individual Plant Applications services. You can modify these default cache properties for a service based on your requirement.
    Service NameProperties
    plantexecutionservicespring_redis_timeout: 5000
    spring_redis_ttl_seconds: 300
    spring_cache_redis_use-key-prefix: "false"
    scheduler_workorder_timer_seconds: 7200
    scheduler_mes_timer_seconds: 1800
    route-servicemaximumProductCacheSize: 1000
    cacheProductExpireAfterAccess: "50m"
    schedulerTime: 600
    route-app-servicemaximumProductCacheSize: 1000
    schedulerTime: 36000
    cacheProductExpireAfterAccess: "15m"
    segmentdefinitionservicemaximumCacheSize: 100
    cacheExpireAfterAccess: "50m"
    operatorappservicecacheDayExpireAfterAccess: 15m
    schedulerTime: 3600
    erptransformationservicemaximumCacheSize: 100
    cacheExpireAfterWrite: 60m
    alarm-app-servicemaximumDayCacheSize: 100
    cacheDayExpireAfterAccess: 12h
    maximumShiftCacheSize: 100
    cacheExpireAfterShiftAccess: 8h
    productionmetrics-app-servicemaximumDayCacheSize: 100
    cacheDayExpireAfterAccess: 1h
    maximumWeekCacheSize: 100
    cacheWeekExpireAfterAccess: 24h
    maximumShiftCacheSize: 1
    cacheShiftExpireAfterAccess: 10m
    downtime-app-servicemaximum5MinCacheSize: 100
    cacheExpireAfter5MinAccess: 5m
    maximumHourCacheSize: 100
    cacheDayExpireAfterHourAccess: 1h
    maximumDayCacheSize: 100
    cacheExpireAfterDayAccess: 24h
    maximumShiftCacheSize: 100
    cacheExpireAfterShiftAccess: 8h
    processanalyzer-app-servicemaximumCacheSize: 100
    cacheExpireAfterAccess: 20m
    tagVariableMaxCacheSize: 100
    tagVariableCacheTimeOut: 6h
    kpiMaxCacheSize: 40
    kpiCacheTimeOut: 30m
    siteParameterMaxCacheSize: 20
    siteParameterCacheTimeOut: 1h
    productionschedulerappserviceconfigurationCacheExpiryTime: 30m
    processorderserviceconfigurationCacheExpiryTime: 30m
    erpexportservicemaximumCacheSize: 100
    cacheExpireAfterAccess: 5m
    cacheLaborExpireAfterAccess: 60m
    erp_export_scheduler_service_enableCleanup: "true"
    erp.export.scheduler.service.cleanupIntervalInMilliseconds: 3600000
    erp.export.scheduler.service.PublishedMessageRetentionInHours: 96
    timebookingservicemaximumWeekCacheSize: 100
    cacheWeekExpireAfterAccess: 24h
    maximumShiftCacheSize: 1
    cacheShiftExpireAfterAccess: 10m
    cacheExpireAfterWrite: 1h
    maximumCacheSize: 100
    erpschedulerserviceerp_scheduler_service_retrylimit: 3
    erp_scheduler_service_importJobPoll_milliseconds: 30000
    erp_scheduler_service_importJobStatusPoll_milliseconds: 30000
  4. Save the changes to the application.properties file for the respective services that you have modified.
  5. Restart the respective services in Tomcat to apply the changes.

Results

The cached services are refreshed after the duration you set in the application.properties file.