Purge URL’s when new post is created

When a new post is created or editted the current post is probable purged.

But meanwhile the Blog listing page en Frontpage also contain a list of the post, so they also should be purged from the cache.
How to auto remove those urls when a post is created?

Are there functions/hooks to use auto auto purge other URLs?

I use APO, but I doubt if its worth it at the moment so maybe I should stop that.

For example something like this:


function cloudflare_do_something($arg){
   cloudflare_purge_url(''https://website.com');
   cloudflare_purge_url(''https://website.com/blogs/');
   cloudflare_purge_url(''https://website.com/about-us/');
}
1 Like

Is there no sollution for this?

If you don’t want to use APO, you could use this…

…or call the API yourself directly…

1 Like