blogtutor / blog-tutor-support

Custom Support Plugin for NerdPress Clients
6 stars 3 forks source link

Create a hook so other plugins/themes can clear Cloudflare Cache #179

Open blogtutor opened 2 years ago

blogtutor commented 2 years ago

I'd like to be able to give the Trellis team a hook so that they can trigger a cache clear after generating Critical Path CSS (which can take minutes or hours). So once the CPCSS is ready, Cloudflare will not continue to serve unoptimized content.

They generate the CPCSS per post/page -- so we'd need the cache clear to be a "prefix" clear for just that one URL. This way it will also clear all the comment URLs too.

ecotechie commented 2 years ago

This seems a bit strange to me. Are they requesting this? Maybe let's discuss this on a call...

ecotechie commented 2 years ago

Thinking of changing the static method calls to self::purge_cloudflare_cache() to be a do_action( 'clear_cloudflare_cache', $args ) in class-support-cloudflare.php

ecotechie commented 5 months ago

@blogtutor are we still wanting to do this? Or should we close the ticket?