Purging after widget changes
-
I’ve never yet found a way of doing this with Varnish either, but now I’m using Nginx FastCGI caching I thought I’d have a look into it. Do you know of anyway of hooking into the saving of widgets to clear the entire cache?
Cheers,
Ed
-
Here’s all the actions I’ve found so far to hook into (taken from Varnish plugin):
// When posts/pages are published, edited or deleted
add_action(‘edit_post’, array($this, ‘PurgePost’), 99);
add_action(‘transition_post_status’, array($this, ‘PurgePost’), 99, 3);// When comments are made, edited or deleted
add_action(‘comment_post’, array($this, ‘PurgePost’),99);
add_action(‘edit_comment’, array($this, ‘PurgePost’),99);
add_action(‘trashed_comment’, array($this, ‘PurgePost’),99);
add_action(‘untrashed_comment’, array($this, ‘PurgePost’),99);
add_action(‘deleted_comment’, array($this, ‘PurgePost’),99);// When posts or pages are deleted
add_action(‘deleted_post’, array($this, ‘PurgePost’), 99);// When xmlRPC call is made
add_action(‘xmlrpc_call’, array($this, ‘PurgeAll’), 99);// When a post changes from future to publish
add_action(‘future_to_publish’, array($this, ‘PurgePost’), 99);// When Theme is changed
add_action(‘switch_theme’, array($this, ‘PurgeAll’), 99);Nginx-helper already has purging support.
Can you please elaborate what do you want? Did you try existing cache-purge functionality?
I’d like to be able to clear the entire cache automatically after making a change to a widget.
Cheers,
EdWe have added a purge-cache option in admin-bar. You can click it whenever you feel there is need to purge entire cache.
For automatic purge, I have opened a ticket here – https://github.com/rtCamp/nginx-helper/issues/48
I can’t assure you when we will be able to add that option. But if you can send a pull-request with required changes, we will be happy to accept that and make it available as part of stable build here on wordpress.org 🙂
- The topic ‘Purging after widget changes’ is closed to new replies.