-
Notifications
You must be signed in to change notification settings - Fork 6
Closed
Description
We have some situations where other plugins need to manipulate the Cache-Control header for various reasons. However the mu plugin makes that difficult to debug or adjust.
One way this can be handled is with a heavy-handed remove_action call, like this:
remove_action( 'send_headers', array( \Pantheon_Cache::instance(), 'cache_add_headers' ) );
I was wondering if you'd consider adding, within the cache_add_headers method, something like:
if ( do_action( 'skip_pantheon_cache_control') ) {
return;
}
And then plugin developers could add something like this in their plugin to circument the cache without reaching into the instance.
add_filter( 'skip_pantheon_cache_control', '__return_true' );
If your code standards prefer the remove_action approach, that's fine. I didn't see prior art of it in other Pantheon plugins, so I figured this is a feature you'd consider introducing.
balman
Metadata
Metadata
Assignees
Labels
No labels