For GET and HEAD requests, adds caching control headers. May be used in conjunction
with DateHeaderPostprocessor to add Date header for GET and HEAD requests.
If the route has a Parameters.Cache.MAX_AGE parameter, whose value is the
max-age in seconds then the following are added:
Cache-Control: max-age=
Expires: now + max-age
If the route has a Flags.Cache.NO_CACHE flag, then the following
headers are set on the response:
Cache-Control: no-cache
Pragma: no-cache
The MAX_AGE parameter takes precidence, in that, if present, the NO_CACHE flag
is ignored.
To use: simply add server.addPostprocessor(new CacheHeaderPostprocessor()); in your main() method.