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,java.lang.Cloneable,net.sf.ehcache.event.CacheEventListener
public final class ResourceCacheService extends fr.paris.lutece.portal.service.cache.AbstractCacheableServiceCache service for resources, resource types and resources providers
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static java.lang.StringgetDatabaseResourceCacheKey(java.lang.String strIdResource)Get the cache key for resources.static ResourceCacheServicegetInstance()Get the instance of the servicejava.lang.StringgetName()static java.lang.StringgetResourceCacheKey(java.lang.String strIdResource, java.lang.String strResourceType)Get the cache key for resourcesstatic java.lang.StringgetResourceTypeCacheKey(java.lang.String strResourceType)Get the cache for resource typesstatic java.lang.StringgetResourceTypeProviderCacheKey(java.lang.String strResourceType)Get the cache key of the association between a resource provider and a resource typestatic java.lang.StringgetResourceTypesListCacheKey()Get the cache key for the list of resource types-
Methods 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 Detail
-
getInstance
public static ResourceCacheService getInstance()
Get the instance of the service- Returns:
- The instance of the service
-
getName
public java.lang.String getName()
-
getResourceTypeProviderCacheKey
public static java.lang.String getResourceTypeProviderCacheKey(java.lang.String strResourceType)
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
public static java.lang.String getResourceTypesListCacheKey()
Get the cache key for the list of resource types- Returns:
- The cache key for the list of resource types
-
getResourceCacheKey
public static java.lang.String getResourceCacheKey(java.lang.String strIdResource, java.lang.String strResourceType)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
public static java.lang.String getDatabaseResourceCacheKey(java.lang.String strIdResource)
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
public static java.lang.String getResourceTypeCacheKey(java.lang.String strResourceType)
Get the cache for resource types- Parameters:
strResourceType- The resource type- Returns:
- The cache key for the given resource type
-
-