Class ResourceCacheService
java.lang.Object
fr.paris.lutece.portal.service.cache.AbstractCacheableService
fr.paris.lutece.plugins.resource.service.ResourceCacheService
- All Implemented Interfaces:
fr.paris.lutece.portal.service.cache.CacheableService,fr.paris.lutece.portal.service.util.LuteceService,Cloneable,net.sf.ehcache.event.CacheEventListener
public final class ResourceCacheService
extends fr.paris.lutece.portal.service.cache.AbstractCacheableService
Cache service for resources, resource types and resources providers
-
Method Summary
Modifier and TypeMethodDescriptionstatic StringgetDatabaseResourceCacheKey(String strIdResource) Get the cache key for resources.static ResourceCacheServiceGet the instance of the servicegetName()static StringgetResourceCacheKey(String strIdResource, String strResourceType) Get the cache key for resourcesstatic StringgetResourceTypeCacheKey(String strResourceType) Get the cache for resource typesstatic StringgetResourceTypeProviderCacheKey(String strResourceType) Get the cache key of the association between a resource provider and a resource typestatic StringGet the cache key for the list of resource typesMethods inherited from class fr.paris.lutece.portal.service.cache.AbstractCacheableService
clone, dispose, enableCache, getCache, getCacheSize, getFromCache, getInfos, getKeys, getMaxElements, getMemorySize, getStatistics, getTimeToLive, initCache, initCache, isCacheEnable, notifyElementEvicted, notifyElementExpired, notifyElementPut, notifyElementRemoved, notifyElementUpdated, notifyRemoveAll, putInCache, removeKey, resetCache
-
Method Details
-
getInstance
Get the instance of the service- Returns:
- The instance of the service
-
getName
-
getResourceTypeProviderCacheKey
Get the cache key of the association between a resource provider and a resource type- Parameters:
strResourceType- The resource type- Returns:
- The cache key of the association between a resource provider and a resource type
-
getResourceTypesListCacheKey
Get the cache key for the list of resource types- Returns:
- The cache key for the list of resource types
-
getResourceCacheKey
Get the cache key for resources- Parameters:
strIdResource- The id of the resourcestrResourceType- The resource type- Returns:
- The cache key for the given resource
-
getDatabaseResourceCacheKey
Get the cache key for resources. This method should only be used to manage database resource type keys.
To cache resources of any other providers, use thegetResourceCacheKey(String strIdResource, String strResourceType)method.- Parameters:
strIdResource- The id of the resource- Returns:
- The cache key for the given resource
-
getResourceTypeCacheKey
Get the cache for resource types- Parameters:
strResourceType- The resource type- Returns:
- The cache key for the given resource type
-