Class PentahoCacheUtil
java.lang.Object
org.pentaho.platform.plugin.services.cache.PentahoCacheUtil
Utility class for Pentaho cache configuration operations.
-
Method Summary
Modifier and TypeMethodDescriptionCreates a default programmatic cache configuration.getDefaultCacheConfiguration(String regionName, URL ehcacheUrl) Loads cache configuration from ehcache.xml.
-
Method Details
-
getDefaultCacheConfiguration
public static javax.cache.configuration.Configuration<Object,Object> getDefaultCacheConfiguration(String regionName, URL ehcacheUrl) Loads cache configuration from ehcache.xml. First tries to find a cache-specific configuration, then falls back to the "defaultCache" configuration. If not found in XML, creates a simple default programmatic configuration.- Parameters:
regionName- the name of the cache region to load configuration forehcacheUrl- the URL of the ehcache.xml configuration file- Returns:
- the cache configuration to use
-
createProgrammaticDefaultConfiguration
public static javax.cache.configuration.Configuration<Object,Object> createProgrammaticDefaultConfiguration()Creates a default programmatic cache configuration. This is used as a fallback when ehcache.xml is not available or doesn't contain default configuration.- Returns:
- a default cache configuration with TTL of 600 seconds and heap size of 1000 entries
-