Class CacheAccessorProvider
- java.lang.Object
-
- org.silverpeas.core.cache.service.CacheAccessorProvider
-
public class CacheAccessorProvider extends Object
A provider of different kinds of cache accessors available in Silverpeas.- Author:
- Yohann Chastagnier
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static org.silverpeas.kernel.cache.service.ApplicationCacheAccessor
getApplicationCacheAccessor()
Gets an accessor to the cache of the application.static SessionCacheAccessor
getSessionCacheAccessor()
Gets an accessor to a useful cache in relation with a session: after the end of the session, the associated cache is trashed.static org.silverpeas.kernel.cache.service.ThreadCacheAccessor
getThreadCacheAccessor()
Gets a useful volatile cache: after the end of the current thread execution, the associated cache is trashed.
-
-
-
Method Detail
-
getThreadCacheAccessor
public static org.silverpeas.kernel.cache.service.ThreadCacheAccessor getThreadCacheAccessor()
Gets a useful volatile cache: after the end of the current thread execution, the associated cache is trashed. BE VERY VERY VERY CAREFULLY: into web application with thread pool management, the thread is never killed and this cache is never cleared. If you want the cache cleared after the end of the request, please use theSimpleCache.clear()
} method of the thread cache.- Returns:
- an accessor to a cache associated to the current thread.
-
getSessionCacheAccessor
public static SessionCacheAccessor getSessionCacheAccessor()
Gets an accessor to a useful cache in relation with a session: after the end of the session, the associated cache is trashed. If no session cache exists, then it is created and returned.- Returns:
- an accessor to a cache associated to the current session.
-
getApplicationCacheAccessor
public static org.silverpeas.kernel.cache.service.ApplicationCacheAccessor getApplicationCacheAccessor()
Gets an accessor to the cache of the application.- Returns:
- an accessor to the application's cache.
-
-