public class CacheFilter extends Object implements javax.servlet.Filter
| Modifier and Type | Field and Description |
|---|---|
static long |
MAX_EXPIRY
Maximum allowed expiry lifetime in seconds, set to one year according to the advice in RFC 2616.
|
static long |
MIN_EXPIRY
Minimum allowed expiry lifetime, zero, which corresponds to not caching at all.
|
| Constructor and Description |
|---|
CacheFilter() |
| Modifier and Type | Method and Description |
|---|---|
void |
destroy()
Make stored references available for garbage collection.
|
void |
doFilter(javax.servlet.ServletRequest req,
javax.servlet.ServletResponse res,
javax.servlet.FilterChain chain)
Set a maximum expiry Cache-Control header applicable to the client and to intermediate caching servers.
|
void |
init(javax.servlet.FilterConfig config)
Parse the Cache-Control configuration parameter as a long integer, and set the filter expiry value, modulo the
minimum and maximum expiry constraints.
|
public static final long MAX_EXPIRY
public static final long MIN_EXPIRY
public void doFilter(javax.servlet.ServletRequest req,
javax.servlet.ServletResponse res,
javax.servlet.FilterChain chain)
throws IOException,
javax.servlet.ServletException
doFilter in interface javax.servlet.FilterIOExceptionjavax.servlet.ServletExceptionpublic void init(javax.servlet.FilterConfig config)
throws javax.servlet.ServletException
init in interface javax.servlet.Filterjavax.servlet.ServletExceptionMIN_EXPIRY,
MAX_EXPIRYpublic void destroy()
destroy in interface javax.servlet.FilterCopyright © 2015-2020 Eclipse Foundation. All Rights Reserved.