Currently, eXo Platform provides 1 Common cache named SettingCache that is used for all modules in eXo Platform.
This cache is handled by SettingService that can be overridden in the exo.properties
file.
#== COMMONS Caches Configuration == #
# Commons Cache Configuration - Settings Service
# - Standalone (live time in seconds)
exo.cache.commons.SettingService.Capacity=2000
exo.cache.commons.SettingService.TimeToLive=60000
# - Cluster (expiration in milliseconds)
exo.cache.commons.SettingService.MaxNodes=2000
exo.cache.commons.SettingService.ExpirationTimeout=6000000
The specific configuration of SettingCache can be found in the file:
$PLATFORM_TOMCAT_HOME/lib/commons-component-common-X.Y.Z.jar!/conf/portal/configuration.xml
(Tomcat).
$PLATFORM_JBOSS_HOME/standalone/deployments/platform.ear!/lib/commons-component-common.jar!/conf/portal/configuration.xml
(JBoss).
$NATIVE_INSTALLER_DIR/apps/exoplatform/lib/commons-component-common-X.Y.Z.jar!/conf/portal/configuration.xml
(Native Installer).
The SettingCache caches the setting value for all contexts and all scopes. When any users ask for the cached setting value, it will be retrieved from cache rather than the database.
The SettingCache is never invalidated.
The SettingCache size equals to the number of setting values in cache.
Each entry of cache is a pair and key is a composite key(Context context, Scope scope, String key). The value is String, Double, Long or Boolean. In reality, the size of these values should be less than 100 bytes, so the maximum heap size equals to the cache size multiplied by 400 bytes.