Purge cache of 1 file which contains many query-string


#1

Hi
I know that there is no way of wildcard cache-purging
but in my case, we have a file named json.js?xx
which xx is a random value. so we have many version of that single file.
is there a way to purge all versions of this file ?

thanks


#2

I am not 100% sure but you might be able to achieve this via CloudFlare’s API.

https://api.cloudflare.com


#3

From what I know about cache purging you can’t purge a wildcard (even though I would love to, or at least by subdomain), you can purge multiple addresses at a time, but every single query string value is different for Cloudflare’s Edge Nodes. I would guess you best bet is purging all (or changing all values for everyone and let the caching headers do their work) and then maybe reworking the way the file is called to prevent this from happening.