WordPress.org

Ready to get started?Download WordPress

Forums

Nginx
[resolved] Purging after widget changes (5 posts)

  1. Ed
    Member
    Posted 10 months ago #

    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

    http://wordpress.org/plugins/nginx-helper/

  2. Ed
    Member
    Posted 10 months ago #

    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);

  3. rahul286
    Member
    Plugin Author

    Posted 10 months ago #

    Nginx-helper already has purging support.

    Can you please elaborate what do you want? Did you try existing cache-purge functionality?

  4. Ed
    Member
    Posted 10 months ago #

    I'd like to be able to clear the entire cache automatically after making a change to a widget.

    Cheers,
    Ed

  5. rahul286
    Member
    Plugin Author

    Posted 9 months ago #

    @Ed

    We 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 :-)

Reply

You must log in to post.

About this Plugin

About this Topic