||Two Servlet Filters Every Web Application Should Have|
Here's a couple of ideas from the Cache filter I wrote and use in production:
- don't use cache when the method is "PUT"
- use special processing for conditional gets ("If-Modified-Since" in the request header).
- cache all the response headers as well as the data.
- pull the cache invalid time per item from the "Expires" response header, if not found use a default.
- implement a web spider to force preemptive caching of the site.