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
NAMEFields inherited from class net.sf.ehcache.constructs.web.filter.SimplePageCachingFilter
DEFAULT_CACHE_NAMEFields inherited from class net.sf.ehcache.constructs.web.filter.Filter
NO_FILTER -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddoInit(javax.servlet.FilterConfig filterConfig) voidenableCache(boolean bEnable) Enable the cacheintGets the number of item currently in the cache.getInfos()Returns cache infosgetKeys()Gets all keys in the cacheintReturns maximum elements accepted into the cachelongReturn the memory sizegetName()Returns the Service namelongReturns the time to live for objects in the cachebooleanGets the current cache status.voidprocessPageEvent(PageEvent event) Process a page eventvoidReset the cache.Methods inherited from class net.sf.ehcache.constructs.web.filter.Filter
destroy, doFilter, getFilterConfig, init
-
Constructor Details
-
HeadersPageCachingFilter
public HeadersPageCachingFilter()
-
-
Method Details
-
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
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
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
Returns cache infos- Specified by:
getInfosin interfaceCacheableService- Returns:
- cache infos
-
processPageEvent
Process a page event- Specified by:
processPageEventin interfacePageEventListener- Parameters:
event- The event to process
-