I need to allow a Radiant user to edit stylesheets and immediately see
the results in generated pages, which means I want to effectively turn
off caching for stylesheets.
I have set the cache timeout to 1 second in environment.rb (for some
reason, setting it to 0 doesn't work in Chrome - great ;]), like so:
config.after_initialize do
SiteController.cache_timeout = 1.second
end
and regular pages show this response header
1.
Cache-Control:
max-age=1, public
But for a stylesheet request, I keep seeing a response header of
1.
Cache-Control:
max-age=2592000, public
which is effectively 30 days.
Stylesheets are served through the SiteController like anything else -
so I don't understand why they don't appear to be subject to the same
caching controls as everything else?
Should stylesheets obey the normal page caching rules?
(I have also tried overriding the "cache?" method of StylesheetPage to
no avail, FYI).
Thanks,
Wes