|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.caucho.filters.ExpiresFilter
public class ExpiresFilter
Caches the servlet output. ExpiresFilter sets the Expires header to a time in the filter. The page will be cached until that time expires.
The cache-time init-parameter configures how long the page should be cached:
<filter> <filter-name>expires-cache</filter-name> <filter-class>com.caucho.http.filter.ExpiresFilter</filter-class> <init-param cache-time='10s'/> </filter>The cache-time allows the standard extensions:
| s | seconds |
| m | minutes |
| h | hours |
| D | days |
| W | weeks |
| M | months |
| Y | years |
| Constructor Summary | |
|---|---|
ExpiresFilter()
|
|
| Method Summary | |
|---|---|
void |
destroy()
Any cleanup for the filter. |
void |
doFilter(ServletRequest request,
ServletResponse response,
FilterChain nextFilter)
The filter add an Expires time in the future. |
void |
init(FilterConfig config)
Filter init reads the filter configuration |
void |
setCacheTime(Period period)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ExpiresFilter()
| Method Detail |
|---|
public void setCacheTime(Period period)
public void init(FilterConfig config)
throws ServletException
init in interface FilterServletException
public void doFilter(ServletRequest request,
ServletResponse response,
FilterChain nextFilter)
throws ServletException,
java.io.IOException
doFilter in interface Filterrequest - the servlet requestresponse - the servlet responsenextFilter - the next filter in the chain
ServletException
java.io.IOExceptionpublic void destroy()
destroy in interface Filter
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||