Class ThreadCacheService
- java.lang.Object
-
- org.silverpeas.core.cache.service.ThreadCacheService
-
- All Implemented Interfaces:
CacheService
public class ThreadCacheService extends Object implements CacheService
A service that uses the local thread to store a cache.
BE VERY VERY CAREFULLY: into web application with thread pool management, the thread is never killed and the cache is then never cleared. So you have to clear explicitly the cache with the {©ode ThreadCacheService#clearAllCaches()} method.- Author:
- mmoquillon
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
ThreadCacheService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clearAllCaches()
Clears all the caches on which this service works.SimpleCache
getCache()
Gets a cache from this service.
-
-
-
Method Detail
-
getCache
public SimpleCache getCache()
Description copied from interface:CacheService
Gets a cache from this service.- Specified by:
getCache
in interfaceCacheService
- Returns:
- either a new cache or a single one according to the policy of the service about the cache(s) on which it works.
-
clearAllCaches
public void clearAllCaches()
Description copied from interface:CacheService
Clears all the caches on which this service works.- Specified by:
clearAllCaches
in interfaceCacheService
-
-