How to purge the contents of a specific Page Rule

Hi.

I’ve got CloudFlare Pro Plan, and I created several Page Rules. One of them is the following (with the aim of making CloudFlare to cache my contents instead of querying my database):

  • shop.mydomain.com/*
    — Browser Cache TTL: 8 hours
    — Cache Level: Cache Everything
    — Edge Cache TTL: a month

Now, I’ve found a mistake in the ‘shop.mydomain.com’ webpages, and would like to purge the cache of that pages. I do not find any place to do it, just “Purge Everything” (which would degrade the load of my original server) or Purge specific URLs (but ‘shop.mydomain.com’ contains 10,000+ different URLs.

Any similiar experience would be welcome. Thank you!

Those are your only options on a Pro Plan. Only Enterprise plans can do partial purges based on certain parameters.

yeah short of CF Enterprise plan support for purge by hostname, on lower plans need to use CF Purge API https://api.cloudflare.com/#zone-purge-files-by-url to script purging by URLs which is at most 30 URLs at time. Example of how I use CF Purge API Can a Worker prevent full cache purges?

CF Enterprise plan has additional custom purge options

image

1 Like

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.