# Cache for Replica Metadata objects # # This cache keeps some metadata objects in memory, # so we don't always have to load from the database. # # Cache Keys: Record Type UUID (string) # Cache Values: Read-Only Record Replica Metadata objects, stored as POJOs appian.cacheattributes.cacheName=recordReplicaMetadataCache appian.cacheattributes.distributionMode=LOCAL_WITH_DISTRIBUTED_CLEAR # Cache algorithm is LIRS appian.cacheattributes.MemoryCacheName=com.appiancorp.cache.JavaCachingSystemLirs # Maximum number of cached objects at any given time # # We have chosen a target capacity of 1000 entries to approximately correspond with the cache of record type # definitions. At time of writing, a single metadata object stores four Longs (8*4=32B), # five UUIDs (37*5=185B), and two sets of attributes, which are Strings containing lists of UUIDs, bounded by # the number of fields on the corresponding record type (max 100). The size is 37B per field UUID * stored a # number of times each (assume 4x) that depends on the usage of the metadata. # So, in terms of total bytes, we're talking about 148B per field plus an overhead of 217B. This gives us # around 3.8 KB for a single metadata object tracking 25 record type fields, for a total cache size of # probably less 5 MB on average. appian.cacheattributes.MaxObjects=1000 # Background memory shrinkage (active eviction) # # Run memory shrinker once an hour # Evict entries that have been idle for two hours appian.cacheattributes.ShrinkerIntervalSeconds=3600 appian.cacheattributes.MaxMemoryIdleTimeSeconds=7200