The main possibility I can think of is if you’re trying to change the cache expiry of files (including images) which are live, public and have Unrestricted Access enabled (i.e. their relative URL path starts with /__data/
).
In that case they’re served directly as files from nginx, bypassing all PHP code execution including the Matrix Cache Manager. This improves performance, but also means that you’d need to set the Cache-Control header in your nginx configuration, by adding or changing the expires
directive under the __data
location:
location /__data {
expires 1M;
The other alternative would be to disable Unrestricted Access on your files, forcing them to be served through Matrix and allowing your cache settings to take effect. Performance would be lower but Squid would normally compensate for most of that. (Also note that if you do this, it would be best to arrange a flush of your entire Squid cache to avoid any broken links or image references, since it would change the URLs of all your files.)