Open kentfredric opened 7 years ago
@kentfredric Okay is this specific to the web server software (Apache vs PSGI Plack, etc)... Or do we somehow enable caching from within Catalyst itself?
Its controlled with headers, which is controlled by whatever your web server software lets you touch.
Headers can be sent within the framework, usually, but can also be sent by the server software.
So "All of the above, it just depends on where the stuff comes from"
Okay well then I have no idea... We use Catalyst which is currently running via PSGI Starman, and in the near future we will switch over to Apache FastCGI. Can you please help point me in the right direction?
Cache controls are a broad subject, and are themselves only regulated by the ability to define HTTP headers. What headers you set and what values you set them to all depends on what you're doing.
For example, this page covers some, but some of the headers you see there are indications to fastly's middleware platform.
https://docs.fastly.com/guides/tutorials/cache-control-tutorial
But there's more docs here: https://developer.mozilla.org/en-US/docs/Web/HTTP/Caching And here: https://www.keycdn.com/blog/http-cache-headers/
How you do that in Catalyst is subject to catalyst, which I haven't looked at for several years now.
But a quick google gives me: http://wiki.catalystframework.org/wiki/adventcalendararticles/2007/11-Making_your_Catalyst_App_Cache-friendly
Analysis by : http://www.webpagetest.org/result/161227_0K_ZNE/1/performance_optimization/
Indicates most of the assets don't have cache controls specified, so they'll likely be refreshed frequently, which will explain: