|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.opensymphony.oscache.web.filter.CacheFilter
CacheFilter is a filter that allows for server-side caching of post-processed servlet content.
It also gives great programatic control over refreshing, flushing and updating the cache.
Constructor Summary | |
CacheFilter()
|
Method Summary | |
void |
destroy()
Filter clean-up |
void |
doFilter(javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response,
javax.servlet.FilterChain chain)
The doFilter call caches the response by wrapping the HttpServletResponse
object so that the output stream can be caught. |
void |
init(javax.servlet.FilterConfig filterConfig)
Initialize the filter. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public CacheFilter()
Method Detail |
public void destroy()
destroy
in interface javax.servlet.Filter
public void doFilter(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response, javax.servlet.FilterChain chain) throws javax.servlet.ServletException, java.io.IOException
HttpServletResponse
object so that the output stream can be caught. This works by splitting off the output
stream into two with the SplitServletOutputStream
class. One stream gets written
out to the response as normal, the other is fed into a byte array inside a ResponseContent
object.
doFilter
in interface javax.servlet.Filter
request
- The servlet requestresponse
- The servlet responsechain
- The filter chain
javax.servlet.ServletException
- IOException
java.io.IOException
public void init(javax.servlet.FilterConfig filterConfig)
ServletCacheAdministrator
instance and configures the filter based on any initialization parameters.The supported initialization parameters are:
application
(default), session
, request
and
page
.
init
in interface javax.servlet.Filter
filterConfig
- The filter configuration
|
See www.opensymphony.com for more information. | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |