Viewing 4 replies - 1 through 4 (of 4 total)
  • Hello Kalligator

    You can see in the top of page

    Update page/post (GatorCache refreshed)

    Or you can look in the html code if the option “Add debug information” is active

    Thread Starter kalligator

    (@kalligator)

    After I update the post I do see the notice “Post updated. View post (GatorCache refreshed)”.
    And the time shown in debug is indeed diffirent.

    But that goes for the specific post only.
    I want to be able to purge ALL cache upon post publish/update or upon any other action.

    What is the gator hook for “delete all cache”?

    Plugin Author GatorDog

    (@gatordog)

    Currently, through the settings, it’s not possible to delete the entire cache when a post is published. You can set it to delete the post cache itself, and optionally any category or archive pages associated with the post.

    If you also want the post to be re-generated on the fly, instead of waiting for a visitor to hit the page and trigger the caching, you can turn “Cache Warming”. This is located on the “Cache Rules” tab.

    If you really wanted to purge all cache when post are updated or published, you can use the WordPress save_post hook. Then use this to delete the entire cache:
    GatorCache::purgeCache(ABSPATH . 'gc-config.ini.php');

    This will work if you just have one cache, ie are not using ssl caching or mobile, etc. In the next release will add a simple purgeAll wrapper function that will handle cases for multiple caches as well.

    Thread Starter kalligator

    (@kalligator)

    Thanks for the reply.
    I’ll try that first chance I get and I’ll await the multiple caches version.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Purge all cache on publish post?’ is closed to new replies.