What's the best way to use CakePHP to control the Expires headers for image and CSS files?
My host unfortunately doesn't support mod_expires
or mod_headers
, so I can't simply set these values in an .htaccess
file. Right now there's no cache control for my files and a lot of unnecessary requests are made.
What's the most elegant way to pipe requests for asset files through Cake and set the appropriate headers via header()
?