Class CacheService
- java.lang.Object
-
- fr.paris.lutece.portal.service.cache.CacheService
-
public final class CacheService extends Object
Provides cache object for cacheable services
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description net.sf.ehcache.CachecreateCache(String strCacheName)Create a cache for a given Servicestatic List<CacheableService>getCacheableServicesList()Returns all registered Cacheable servicesstatic CacheServicegetInstance()Gets the unique instance of the CacheServicestatic voidregisterCacheableService(CacheableService cs)Registers a new CacheableServicestatic voidresetCaches()Reset all cachesvoidshutdown()Shutdown the cache service and the cache manager.static voidstoreCachesStatus()Stores cache statusstatic voidupdateCacheStatus(CacheableService cs)Update cache status
-
-
-
Method Detail
-
getInstance
public static CacheService getInstance()
Gets the unique instance of the CacheService- Returns:
- The unique instance of the CacheService
-
createCache
public net.sf.ehcache.Cache createCache(String strCacheName)
Create a cache for a given Service- Parameters:
strCacheName- The Cache/Service name- Returns:
- A cache object
-
resetCaches
public static void resetCaches()
Reset all caches
-
shutdown
public void shutdown()
Shutdown the cache service and the cache manager. Should be called when the webapp is stopped.
-
registerCacheableService
public static void registerCacheableService(CacheableService cs)
Registers a new CacheableService- Parameters:
cs- The CacheableService
-
getCacheableServicesList
public static List<CacheableService> getCacheableServicesList()
Returns all registered Cacheable services- Returns:
- A collection containing all registered Cacheable services
-
storeCachesStatus
public static void storeCachesStatus()
Stores cache status
-
updateCacheStatus
public static void updateCacheStatus(CacheableService cs)
Update cache status- Parameters:
cs- Cacheable Service
-
-