Question about purging by prefix

If I want to purge all files that begin with the same name - for example:

example.com/foo-1.jpg
example.com/foo-2.jpg
example.com/foo-3.jpg

Would purging by prefix of example.com/foo do the trick, or do I need to send each url separately?

Thank you

Yes, but needs an Enterprise plan…

I’m on enterprise. Are you sure this would not be treated as a folder, looking to purge everything under foo/ rather than anything that begins with foo?

[edit] Hmm, not sure on reflection. Will try it later.

OK, I wasn’t sure when reading that page as all examples were for folders.

Thanks for clarifying this!

It does seem to work as you want. I created https://cf.sjr.dev/foo-1.jpg (and 2 and 3), loaded them a few times to get cache HIT, then purging the prefix cf.sjr.dev/foo and all 3 showed a cache MISS on first load.

1 Like

Thank you :pray:

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