- All Implemented Interfaces:
- javax.servlet.Filter
public class StaticContentCacheFilter
extends Object
implements javax.servlet.Filter
This filter sets the proper http header for those filtered resources we want to cache. It implements "strong caching" (one year).
Do not cache resources that change often. For semi-static resources a strategy based on heuristic or url modifying is recommended
(you can use "strong caching" for resources that are application data if you are sure your application modifies the URL every time the data is modified).
GWT apps resources marked with standard ".nocache." will be bypassed.
This solution is based on Google recommendations: https://developers.google.com/speed/docs/best-practices/caching?hl=es
Params initialization and url patterns treatment (matches, nocaches and wildcards) is inspired by jodd.servlet.filter.GzipFilter.java
http://jodd.org/doc/htmlstapler/enabling-gzip.html#GZIP-filter