net.sf.ehcache.constructs.web.filter
public class SimplePageFragmentCachingFilter extends PageFragmentCachingFilter
/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.
Version: $Id: SimplePageFragmentCachingFilter.java 161 2006-07-29 20:35:28Z gregluck $
Field Summary | |
---|---|
static String | NAME
This filter's name |
Method Summary | |
---|---|
protected String | calculateKey(HttpServletRequest httpRequest)
CachingFilter works off a key.
|
protected CacheManager | getCacheManager()
Gets the CacheManager for this CachingFilter. |
protected String | getCacheName()
Returns the name of the cache to use for this filter. |
Parameters: httpRequest
Returns: the key, generally the URL plus request parameters
Returns: the CacheManager to be used
Since: 1.2.1