net.sf.ehcache.constructs.web.filter
public class SimplePageCachingFilter extends CachingFilter
/admin/SomePage.jsp?id=1234&name=Beagle
.
This key technique is suitable for a wide range of uses. It is independent of hostname and port number, so will
work well in situations where there are multiple domains which get the same content, or where users access
based on different port numbers.
A problem can occur with tracking software, where unique ids are inserted into request query strings. Because
each request generates a unique key, there will never be a cache hit. For these situations it is better to
parse the request parameters and override calculateKey with
an implementation that takes account of only the significant ones.
Accept-Encoding: gzip
Version: $Id: SimplePageCachingFilter.java 125 2006-06-12 06:52:31Z gregluck $
Field Summary | |
---|---|
static String | NAME
The name of the filter. |
Method Summary | |
---|---|
protected String | calculateKey(HttpServletRequest httpRequest)
Pages are cached based on their key. |
protected CacheManager | getCacheManager()
Gets the CacheManager for this CachingFilter. |
protected String | getCacheName()
A meaningful name representative of the JSP page being cached.
|
/admin/SomePage.jsp?id=1234&name=Beagle
.
This key technique is suitable for a wide range of uses. It is independent of hostname and port number, so will
work well in situations where there are multiple domains which get the same content, or where users access
based on different port numbers.
A problem can occur with tracking software, where unique ids are inserted into request query strings. Because
each request generates a unique key, there will never be a cache hit. For these situations it is better to
parse the request parameters and override calculateKey with
an implementation that takes account of only the significant ones.
The key should be unique
Parameters: httpRequest
Returns: the key, generally the URI plus request parameters
Returns: the CacheManager to be used
Since: 1.2.1
Returns: the name of the cache to use for this filter.