It seems that by default Catalyst does not output Cache-Control:
, etc. headers. I know I can output them in a given controller method like this:
$c->response->headers->last_modified(time);
$c->response->headers->expires(time + $self->{cache_time});
$c->response->headers->header(cache_control => "public, max-age=$self->{cache_time}");
It'd get pretty painful doing that in each method, though! What I'd prefer is:
- A default set of headers (expires now, last modified now, cache-control: no-cache, pragma: no-cache)
- A way to, per-method, override the default.
Is there a good way to accomplish this?