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
-
-
Constructor Summary
Constructors Constructor Description HeadersPageCachingFilter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddoInit(javax.servlet.FilterConfig filterConfig)voidenableCache(boolean bEnable)Enable the cacheintgetCacheSize()Gets the number of item currently in the cache.StringgetInfos()Returns cache infosList<String>getKeys()Gets all keys in the cacheintgetMaxElements()Returns maximum elements accepted into the cachelonggetMemorySize()Return the memory sizeStringgetName()Returns the Service namelonggetTimeToLive()Returns the time to live for objects in the cachebooleanisCacheEnable()Gets the current cache status.voidprocessPageEvent(PageEvent event)Process a page eventvoidresetCache()Reset the cache.
-
-
-
Method Detail
-
doInit
public void doInit(javax.servlet.FilterConfig filterConfig)
- Overrides:
doInitin classnet.sf.ehcache.constructs.web.filter.CachingFilter
-
isCacheEnable
public boolean isCacheEnable()
Gets the current cache status.- Specified by:
isCacheEnablein interfaceCacheableService- Returns:
- true if enable, otherwise false
-
getCacheSize
public int getCacheSize()
Gets the number of item currently in the cache.- Specified by:
getCacheSizein interfaceCacheableService- Returns:
- the number of item currently in the cache.
-
resetCache
public void resetCache()
Reset the cache.- Specified by:
resetCachein interfaceCacheableService
-
getName
public String getName()
Returns the Service name- Specified by:
getNamein interfaceLuteceService- Returns:
- The name as a String
-
enableCache
public void enableCache(boolean bEnable)
Enable the cache- Specified by:
enableCachein interfaceCacheableService- Parameters:
bEnable- true to enable, false to disable
-
getKeys
public List<String> getKeys()
Gets all keys in the cache- Specified by:
getKeysin interfaceCacheableService- Returns:
- The List
-
getMaxElements
public int getMaxElements()
Returns maximum elements accepted into the cache- Specified by:
getMaxElementsin interfaceCacheableService- Returns:
- The max elements
-
getTimeToLive
public long getTimeToLive()
Returns the time to live for objects in the cache- Specified by:
getTimeToLivein interfaceCacheableService- Returns:
- The time to live in seconds
-
getMemorySize
public long getMemorySize()
Return the memory size- Specified by:
getMemorySizein interfaceCacheableService- Returns:
- the memory size
-
getInfos
public String getInfos()
Returns cache infos- Specified by:
getInfosin interfaceCacheableService- Returns:
- cache infos
-
processPageEvent
public void processPageEvent(PageEvent event)
Process a page event- Specified by:
processPageEventin interfacePageEventListener- Parameters:
event- The event to process
-
-