Configure the Cache Settings for the Plant Applications Services
About this task
- Time - Describes the duration of caching. For example, if the day cache expiry duration is 24 hours for a particular cache, the data is stored for 24 hours duration. You can modify the duration of cache, as required.
- Size - Describes the data storage or caching size of the services. The data storage size provides you the number of keys stored. For example, if the day cache size is 100, it indicates that the data stored for that cache is limited to 100 keys or entities.
- If the size is increased, the cached data will consume more RAM and it increases the response time of APIs. Also, the system performance will go down.
- If the size is decreased, the cached data will overflow, and the PA service will try to retrieve it from the database. In such case the APIs' response time will increase, and there will be chances of missing the information on cached data, and/or the cached data value will be null in the respective field.
- If the time is increased, the cached data will consume more time to reflect on the UI, and there will be chances of fetching the outdated data.
- If the time is decreased, the performance of that service will decrease as the system will utilize the resources in the back end. Also, the APIs' response time will increase.
Procedure
- Enterprise Installation: In the directory <installFolder>/installation/PlantApplicationsDocker/plantapps-we-docker/mnt/configfiles/, access the folder for the required services. For example, access alarm-app-service, then open the prod folder to access the application.properties file.
-
Standard 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.
- <tomcat_home>: Is the directory where you
installed Apache Tomcat. For example,
-
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. The caching properties are
described based on its configuration as listed in the table.
Service Name Properties Description plant-execution-service scheduler_workorder_timer_seconds = 21600 This service caches all the work order information associated with non-conformance. The cached data from the non-conformance application will be refreshed every 21600 seconds (6 hours). scheduler_mes_timer_seconds = 1800 The scheduler runs every 1800 seconds (30 minutes), and will retrieve all the information and caches the following data: - NCM context type
- Reason trees
- Product family
- Units
route-service maximumProductCacheSize = 1000 cacheProductExpireAfterAccess = 15m
This parameter caches the following data: - Line by Id using line Id
- Units using line Id
route-app-service maximumProductCacheSize = 1000 cacheProductExpireAfterAccess = 15m
This parameter caches the following data: - All labor type information using labor type Id
- List of lines
- Line details by line Id
- All the Unit of Measure (UoM) details
- UoM by Id using UoM Id
- All the property data types information from property definition service
- Product family information using product family Id
supervisor-app-service supervisor.scheduler.delay = 3600000 In this service, the scheduler delay runs every 3600000 milliseconds (1 hour) to retrieve the stored information. segment-definition-service maximumCacheSize = 100 cacheExpireAfterAccess = 50m
This parameter caches the following data: - Lines using line Id
- Units for line using line Id for unit
- All units
- Labor type using labor type Id
operator-app-service mes.redis.cache.duration = DAYS mes.redis.cache.time-to-live = 1
In this service, the redis cache key is used to store the cached data for a day (24 hours). The data cached will be refreshed every 24 hours. erp-import-service maximumCacheSize = 100 cacheExpireAfterWrite = 5m
The ERP import service will cache the planned lines. The information cached will be limited to 100 keys and will expire every 5 minutes. Note: In the erp-import-service, the data is transferred from ERP to MES.erp-export-service maximumCacheSize = 100 cacheExpireAfterWrite = 5m
The ERP export service will cache the following data: - Production lines
- Units
Note: In the erp-export-service, the data is transferred from MES to ERP.cacheLaborExpireAfterAccess = 60m The ERP export service will cache the labor type data. The data cached will expire every 60 minutes (1 hour). process-analyzer-app-service maximumCacheSize = 100 cacheExpireAfterAccess = 20m
This parameter is used to cache the event or the batch information. The information cached will be limited to 100 keys and will expire every 20 minutes. tagVariableMaxCacheSize = 100 tagVariableCacheTimeOut = 6h
This parameter is used to cache the tags and variables. The data cached will be limited to 100 keys and will expire every 6 hours. kpiMaxCacheSize = 40 kpiCacheTimeOut = 30m
This parameter is used to cache the KPIs. The data cached will be limited to 40 keys and will expire every 30 minutes. siteParameterMaxCacheSize = 20 siteParameterCacheTimeOut = 1h
This parameter is used to cache the site parameters. The data cached will be limited to 40 keys and will expire every hour. mes-data-service historianTagMaxCacheSize = 50000 historianTagCacheTimeOut = 6h
This parameter is used to cache the historian tag information. The data cached will be stored in 50000 keys and will expire every 6 hours. scheduler.tagcaching.seconds = 21600 The scheduler runs every 21600 seconds (6 hours) to internally cache the tags. alarm-app-service maximumDayCacheSize = 100 cacheDayExpireAfterAccess = 12h
This parameter caches the following data: - Variables under the unit
- Alarm sheet for the variables
maximumShiftCacheSize = 100 cacheExpireAfterShiftAccess = 8h
This parameter caches the following data: - Reason tree nodes
- Reason tree header
maximumHourCacheSize = 100 cacheExpireAfterHourAccess = 1h
This parameter is used to cache the specification limits for the variables. The data cached will be limited to 100 keys and will expire every hour. productionmetrics-app-service maximumDayCacheSize = 100 cacheDayExpireAfterAccess = 1h
This parameter caches the following data for a day cache: - Current day performance summary
- Current day performance categories
- Current day quality distribution
- Current availability pareto
- Current availability category
- Current availability line gantt chart
- Current availability unit gantt chart
- Current day KPI
maximumWeekCacheSize = 100 cacheWeekExpireAfterAccess = 24h
This parameter caches the following data for a week cache: - Week performance summary
- Week performance categories
- Week quality distribution
- Week availability pareto
- Week availability category
- Week availability line gantt chart
- Week availability unit gantt chart
- Week KPI
maximumShiftCacheSize = 1 cacheShiftExpireAfterAccess = 10m
The shift cache data stores the list of shift information (i.e., the list of shifts of type S88R) in a single key or entity. The data cached will expire every 10 minutes. downtime-app-service maximumHourCacheSize = 100 cacheDayExpireAfterHourAccess = 1h
This parameter caches the following data for an hour cache: - Top five reasons for the unit
- Active products for the units for the given intervals
maximumShiftCacheSize = 100 cacheExpireAfterShiftAccess = 8h
This parameter caches the following data for a shift cache: - Reason headers for the unit
- Reason options for the unit
- Fault options for the unit
- Product information for the given product Id
production-scheduler-app-service maximumSize = 500 configurationCacheExpiryTime = 30m
This parameter caches the following data: - Unit of measure
- Property definition data types
maximumSize = 500 configurationCacheExpiryTime = 2h
This parameter is used to cache the username details for the given user Id. The data cached will be limited to 500 keys and will expire every 2 hours. process-order-service maximumSize = 5000 configurationCacheExpiryTime = 10m
This parameter caches the following data: - User Id for the given username
- Execution path permissions
waste-management-app-service maximumDayCacheSize = 1000 cacheDayExpireAfterAccess = 24h
This parameter is used to cache all the product records using the page size. The data cached will be limited to 1000 keys and will expire every 24 hours. maximumShiftCacheSize = 100 cacheShiftExpireAfterAccess = 4h
This parameter caches the following data: - Reason headers for unit.
- Reasons for unit.
- Groups for unit.
webgenealogy-app-service genealogy.scheduler.timer.seconds = 36000 The scheduler runs every 36000 seconds (10 hours), and will retrieve all the information and caches the following data: - All lines
- All units
- All Product family
- Material lot status
Bom-management-app-service maximumCacheSize = 100 cacheExpireAfterWrite = 1h
This parameter caches the following data: - All lines with units
- All engineering units
- Engineering unit by Id
Approval-cockpit-service NA (observed a few cache properties defined in application.properties file but they are not in use). NA Approval-cockpit-app-service NA (observed a few cache properties defined in application.properties file but they are not in use). NA Receiving-inspection-app-service maximumCacheSize = 100 cacheExpireAfterWrite = 1h
This parameter caches the following data: - Unit
- Line
- Production status
Receiving-inspection-service maximumCacheSize = 100 cacheExpireAfterWrite = 1h
This parameter caches the following data: - All units for the given line Id
- All data types
Time-booking-app-service maximumCacheSize = 100 cacheExpireAfterWrite = 1h
This parameter caches the following data: - Reason tree nodes
- All reason trees
- Lines
- Units
- Labor type records
property-definition-app-service NA (observed a few cache properties defined in application.properties file but they are not in use). NA property-definition-service NA (observed a few cache properties defined in application.properties file but they are not in use). NA usersettings-service maximumDayCacheSize = 100 cacheDayExpireAfterAccess = 24h
This parameter is used to cache the user settings information. The data cached will be limited to 100 keys and will expire every 24 hours. activities-app-service maximumHourCacheSize = 100 cacheDayExpireAfterHourAccess = 1h
This parameter caches the following data: - The activity Ids for the test record Ids
- Sheet display options
- Sheet custom form data
- Historian tag names
- Array data for the given array Id
- E-signature level for the variable
- E-signature approvers
- Variable specifications
maximum5MinCacheSize = 100 cacheExpireAfter5MinAccess = 5m
This parameter caches the following data: - Products on a unit
- Override lock security permission values for the user
- E-signature records
maximumShiftCacheSize = 100 cacheExpireAfterShiftAccess = 8h
This parameter is used to cache the product groups on a unit. The data cached will be limited to 100 keys and will expire every 8 hours. activities-service maximumHourCacheSize = 100 cacheDayExpireAfterHourAccess = 1h
This parameter caches the following data: - Activities view by groups
- Activity variable history
- Activity variable by activity Id
- Activity Ids for test records
- Activity custom data types
maximumDayCacheSize = 100 cacheExpireAfterDayAccess = 24h
This parameter caches the following data: - Time selection options
- Shifts
- Activity variable groups
- User Id for the given username
esignature-app-service maximumShiftCacheSize = 10 cacheExpireAfterShiftAccess = 8h
This parameter caches the following data: - Preferred units for user
- Tree nodes
- E-signature session inactive interval
- E-signature configuration
my-machines-service maximumDayCacheSize = 100 cacheExpireAfterAccess = 24h
This parameter is used to cache the preferred units. The data cached will be limited to 100 keys and will expire every 24 hours. product-service maximumProductsCacheSize=1000 cacheProductExpireAfterAccess=15m
This parameter is used to cache the products. The data cached will be limited to 1000 products and will expire every 15 minutes. -
Save the changes to the
application.properties
file for the respective services that you have modified. - Restart the respective services in Tomcat to apply the changes.