Caching issues even after clearing Matrix and Squid caches


#1

Matrix Version: 5.2

So I have a webpage with some PDF links.

I update the PDFs.

Then I cleared Matrix Cache and Squid cache from admin panel for the page containing PDFs.

Then opened the page in a new browser, and still see old URL. i.e (mysite.com/file.pdf?v=0.1.1)

A simple F5 refresh, display the latest PDF url. i.e. (mysite.com/file.pdf?v=0.1.2)

Does anyone know what’s going on ? I expect to see the latest PDF link on first load after after clearing Matrix and Squid cache, but its not happening.

Any help is very appreciated.

Thanks


(Bart Banda) #2

Check the headers to see where the response is coming from, your browser cache, squid, or the server.

If it comes from Squid, then your squid cache clearing might not be working correctly.

Alternatively, becuase the page doesn’t have a new last modified header, your browser/squid might also ignore grabbing a new version. Check in your matrix system config if Send Last-Modified Header? is set to Yes, if it is, set to No, as it can cause issues with things like this.


#3

Hi Bart. Thanks again for your reply.

The content is coming from Squid.
Send Last-Modified Header is set to YES

And Yes, the “Last-Modified Header” is not playing any role here, as I am not updating the page itself.

Do you think Setting the “Send Last-Modified header” to No will have any other side effects ? I mean, won’t it put more load on the server, as most requests will bypass Squid cache ? I am not sure if Matrix allows to control headers for indivisual pages ?

Also if “Squid Caching” in not working properly, any pointers for Squid debugging, as I have no Squid troubleshooting experience,?


(Bart Banda) #4

Ah, that’s probably the issue. The version in Squid is expired so even though Squid might try and go to Matrix to check if there is a new version of the page, it won’t grab it unless it’s last-modified header is newer than the version it’s got. I would turn it off (set it to No).

Not really, the performance impact won’t be noticeable, because it won’t happen that often. It’s a best practice at Squiz at the moment to turn it off until we can figure out to reliably update it in Matrix (we’reworking on it).

But seeing as your Squid clearing function from Matrix doesn’t seem to clear the cache in Squid, might be an issue with the Squid settings in Matrix.

If you are a Squiz client, you might need to send a ticket in for the support guys to have a closer look if that’s the case.