|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.hd.d.pg2k.webSvr.util.ExplicitCacheTimeFilter
public final class ExplicitCacheTimeFilter
Explicitly allows browser to cache filtered items. This sets values that explicitly allow the client to cache the item for a longish time (of the order of hours to weeks) on the assumption that the filtered item changes slowly.
This should work even when the items are delivered over HTTPS, which would normally prevent them being cached.
This should work for HTTP/1.0 clients (we set Expires), and HTTP/1.1 client (we set Cache-Control).
This filter is stateless and as lightweight and simple as possible.
| Field Summary | |
|---|---|
private static java.lang.String |
ANTI_DUP_ATTR_NAME
Name of attribute that we use to avoid duplicate application of this filter on one filter chain. |
private static java.lang.String[] |
DANGER_HEADERS
Headers that we set to make cacheing work. |
| Constructor Summary | |
|---|---|
ExplicitCacheTimeFilter()
|
|
| Method Summary | |
|---|---|
void |
destroy()
Take this filter out of service. |
void |
doFilter(javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response,
javax.servlet.FilterChain chain)
Filter one item. |
void |
init(javax.servlet.FilterConfig filterConfig)
Bring filter into service. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private static final java.lang.String[] DANGER_HEADERS
These should be matched case-insensitively.
private static final java.lang.String ANTI_DUP_ATTR_NAME
| Constructor Detail |
|---|
public ExplicitCacheTimeFilter()
| Method Detail |
|---|
public void init(javax.servlet.FilterConfig filterConfig)
init in interface javax.servlet.Filterpublic void destroy()
destroy in interface javax.servlet.Filter
public void doFilter(javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response,
javax.servlet.FilterChain chain)
throws java.io.IOException,
javax.servlet.ServletException
doFilter in interface javax.servlet.Filterjava.io.IOException
javax.servlet.ServletException
|
DHD Multimedia Gallery V1.57.21 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||