open-menu-button

Have you tried clearing the cache?

By: sova

I ask this question often at my workplace when someone’s website breaks for no reason.

As they say, “There are two really hard software development problems – cache invalidation and variable naming”, and cache is breaking websites surprisingly often. To clear the cache, you have to log in, and this step is not so simple if you have a monstrosity of a password, or if it is simply not your website and you’re fixing it for someone.

In case of server WordPress caching, there is a trick – you can append ?nocache query string to the end of the URL so it’ll become something like “https://yourwebsite.com/?nocache”. It’s a very quick test, and many caching plugins recognize this parameter and shows an uncached page version. Some plugins use their own versions of this string, e.g. WPRocket uses ?nowprocket  and Lite Speed Cache uses ?LSCWP_CTRL=NOCACHE, but generally just ?nocache is fine.

That’s of course not a universal solution – the plugin might ignore that query string alltogether or that’s might just be CDN or object cache problem and both bother reacting to query strings of any kind, but given the speed of a check, it’s a lifesaver if you suspect the plugin cache yourself, and just need a proof without a hassle of logging in.

Comments