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 Details

    • getInstance

      public static ResourceCacheService getInstance()
      Get the instance of the service
      Returns:
      The instance of the service
    • getName

      public String getName()
    • getResourceTypeProviderCacheKey

      public static String getResourceTypeProviderCacheKey(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 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 String getResourceCacheKey(String strIdResource, String strResourceType)
      Get the cache key for resources
      Parameters:
      strIdResource - The id of the resource
      strResourceType - The resource type
      Returns:
      The cache key for the given resource
    • getDatabaseResourceCacheKey

      public static String getDatabaseResourceCacheKey(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 the getResourceCacheKey(String strIdResource, String strResourceType) method.
      Parameters:
      strIdResource - The id of the resource
      Returns:
      The cache key for the given resource
    • getResourceTypeCacheKey

      public static String getResourceTypeCacheKey(String strResourceType)
      Get the cache for resource types
      Parameters:
      strResourceType - The resource type
      Returns:
      The cache key for the given resource type