Class HeadersPageCachingFilter

java.lang.Object
net.sf.ehcache.constructs.web.filter.Filter
net.sf.ehcache.constructs.web.filter.CachingFilter
net.sf.ehcache.constructs.web.filter.SimplePageCachingFilter
net.sf.ehcache.constructs.web.filter.SimpleCachingHeadersPageCachingFilter
fr.paris.lutece.portal.service.cache.HeadersPageCachingFilter
All Implemented Interfaces:
CacheableService, PageEventListener, LuteceService, EventListener, javax.servlet.Filter
Direct Known Subclasses:
FullPageCachingService

public class HeadersPageCachingFilter extends net.sf.ehcache.constructs.web.filter.SimpleCachingHeadersPageCachingFilter implements CacheableService, PageEventListener
Headers Page Caching Filter based on EHCACHE WEB
  • Field Summary

    Fields inherited from class net.sf.ehcache.constructs.web.filter.SimpleCachingHeadersPageCachingFilter

    NAME

    Fields inherited from class net.sf.ehcache.constructs.web.filter.SimplePageCachingFilter

    DEFAULT_CACHE_NAME

    Fields inherited from class net.sf.ehcache.constructs.web.filter.Filter

    NO_FILTER
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    doInit(javax.servlet.FilterConfig filterConfig)
    void
    enableCache(boolean bEnable)
    Enable the cache
    int
    Gets the number of item currently in the cache.
    Returns cache infos
    Gets all keys in the cache
    int
    Returns maximum elements accepted into the cache
    long
    Return the memory size
    Returns the Service name
    long
    Returns the time to live for objects in the cache
    boolean
    Gets the current cache status.
    void
    Process a page event
    void
    Reset the cache.

    Methods inherited from class net.sf.ehcache.constructs.web.filter.Filter

    destroy, doFilter, getFilterConfig, init

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • HeadersPageCachingFilter

      public HeadersPageCachingFilter()
  • Method Details

    • doInit

      public void doInit(javax.servlet.FilterConfig filterConfig)
      Overrides:
      doInit in class net.sf.ehcache.constructs.web.filter.CachingFilter
    • isCacheEnable

      public boolean isCacheEnable()
      Gets the current cache status.
      Specified by:
      isCacheEnable in interface CacheableService
      Returns:
      true if enable, otherwise false
    • getCacheSize

      public int getCacheSize()
      Gets the number of item currently in the cache.
      Specified by:
      getCacheSize in interface CacheableService
      Returns:
      the number of item currently in the cache.
    • resetCache

      public void resetCache()
      Reset the cache.
      Specified by:
      resetCache in interface CacheableService
    • getName

      public String getName()
      Returns the Service name
      Specified by:
      getName in interface LuteceService
      Returns:
      The name as a String
    • enableCache

      public void enableCache(boolean bEnable)
      Enable the cache
      Specified by:
      enableCache in interface CacheableService
      Parameters:
      bEnable - true to enable, false to disable
    • getKeys

      public List<String> getKeys()
      Gets all keys in the cache
      Specified by:
      getKeys in interface CacheableService
      Returns:
      The List
    • getMaxElements

      public int getMaxElements()
      Returns maximum elements accepted into the cache
      Specified by:
      getMaxElements in interface CacheableService
      Returns:
      The max elements
    • getTimeToLive

      public long getTimeToLive()
      Returns the time to live for objects in the cache
      Specified by:
      getTimeToLive in interface CacheableService
      Returns:
      The time to live in seconds
    • getMemorySize

      public long getMemorySize()
      Return the memory size
      Specified by:
      getMemorySize in interface CacheableService
      Returns:
      the memory size
    • getInfos

      public String getInfos()
      Returns cache infos
      Specified by:
      getInfos in interface CacheableService
      Returns:
      cache infos
    • processPageEvent

      public void processPageEvent(PageEvent event)
      Process a page event
      Specified by:
      processPageEvent in interface PageEventListener
      Parameters:
      event - The event to process