Class CacheAccessorProvider


  • public class CacheAccessorProvider
    extends Object
    A provider of different kinds of cache accessors available in Silverpeas.
    Author:
    Yohann Chastagnier
    • 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 the SimpleCache.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.