Support » Plugin: WP-Optimize - Cache, Clean, Compress. » clear cache after posting blog article

  • Resolved pullober


    i am not that good in creating a function i need with your examples.
    my editor wrote me, she can not see the article. so after posting this article, the cache did not clear itself. manually cleared the cache – ta-daa. the article was here.

    the checkbox to generate cache for logged in users is unchecked.

    realizing this action with the excluded paths is not an option because of the permalink settings. it would exclude everything from caching, which is not my whish.

    how should my funktion look like with your hook “wpo_purge_cache_hooks” to delete or exclude (anything that helps) cache for any classic blog articles?

    i was on your FAQ page (Cache/Partial cache purge), but i do need someone holding my hand and telling me exactly what to write in my functions.php

    it should say: delete cache after posting a blog article:

    // Add a new action that will trigger a cache purge
    add_filter( 'wpo_purge_cache_hooks', function( $actions ) {
        $actions[] = 'my_custom_action';
        return $actions;
    } );

    maybe plain basics – sorry.

    thanks a lot in advance!

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support Harshad


    @pullober Please add the following code to your active theme’s functions.php file

    add_filter('wpo_purge_all_cache_on_update', '__return_true');

    It will purge the cache while adding/updating the post/page.

    Thread Starter pullober


    thank you veryverymuch!

    Plugin Support Harshad


    @pullober You’re welcome 🙂

    If you have any more questions, please feel free to write back to us.

    Hi. Unlike the majority of caching plugins, WP-Optimize promptly and automatically purges the ENTIRE cache. Is there any code to prevent automatic cache purge?
    I need to use customizer to add / remove css files, or deactivate / activate plugins, and I don’t want an automatic cache purge.
    Is there any way to prevent automatic cache purge?
    Thanks in advance!

Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.