public class HeadersPageCachingFilter extends net.sf.ehcache.constructs.web.filter.SimpleCachingHeadersPageCachingFilter implements CacheableService, PageEventListener
NAMEDEFAULT_CACHE_NAME| Constructor and Description |
|---|
HeadersPageCachingFilter() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
doFilter(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
javax.servlet.FilterChain chain) |
void |
doInit(javax.servlet.FilterConfig filterConfig) |
void |
enableCache(boolean bEnable)
Enable the cache
|
protected String |
getCacheName()
This method is overriden to provide the cache name
|
int |
getCacheSize()
Gets the number of item currently in the cache.
|
String |
getInfos()
Returns cache infos
|
List<String> |
getKeys()
Gets all keys in the cache
|
int |
getMaxElements()
Returns maximum elements accepted into the cache
|
long |
getMemorySize()
Return the memory size
|
String |
getName()
Returns the Service name
|
long |
getTimeToLive()
Returns the time to live for objects in the cache
|
boolean |
isCacheEnable()
Gets the current cache status.
|
void |
processPageEvent(PageEvent event)
Process a page event
|
void |
resetCache()
Reset the cache.
|
buildPage, calculateTimeToLiveMilliseconds, getHttpDateFormatter, writeResponsecalculateKey, getCacheManagerbuildPageInfo, checkNoReentry, doDestroy, setCacheNameIfAnyConfigured, setContentType, setCookies, setHeaders, setStatus, writeContentpublic void doInit(javax.servlet.FilterConfig filterConfig)
throws net.sf.ehcache.CacheException
doInit in class net.sf.ehcache.constructs.web.filter.CachingFilternet.sf.ehcache.CacheExceptionprotected String getCacheName()
getCacheName in class net.sf.ehcache.constructs.web.filter.SimplePageCachingFilterprotected void doFilter(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
javax.servlet.FilterChain chain)
throws net.sf.ehcache.constructs.web.AlreadyGzippedException,
net.sf.ehcache.constructs.web.AlreadyCommittedException,
net.sf.ehcache.constructs.web.filter.FilterNonReentrantException,
net.sf.ehcache.constructs.blocking.LockTimeoutException,
Exception
doFilter in class net.sf.ehcache.constructs.web.filter.CachingFilternet.sf.ehcache.constructs.web.AlreadyGzippedExceptionnet.sf.ehcache.constructs.web.AlreadyCommittedExceptionnet.sf.ehcache.constructs.web.filter.FilterNonReentrantExceptionnet.sf.ehcache.constructs.blocking.LockTimeoutExceptionExceptionpublic boolean isCacheEnable()
isCacheEnable in interface CacheableServicepublic int getCacheSize()
getCacheSize in interface CacheableServicepublic void resetCache()
resetCache in interface CacheableServicepublic String getName()
getName in interface LuteceServicepublic void enableCache(boolean bEnable)
enableCache in interface CacheableServicebEnable - true to enable, false to disablepublic List<String> getKeys()
getKeys in interface CacheableServicepublic int getMaxElements()
getMaxElements in interface CacheableServicepublic long getTimeToLive()
getTimeToLive in interface CacheableServicepublic long getMemorySize()
getMemorySize in interface CacheableServicepublic String getInfos()
getInfos in interface CacheableServicepublic void processPageEvent(PageEvent event)
processPageEvent in interface PageEventListenerevent - The event to processCopyright © 2015 City of Paris. All rights reserved.