Support » Plugin: WP-Optimize - Cache, Clean, Compress. » Cache Purging Issues

  • Resolved cryptozink

    (@cryptozink)


    Hello, I love the plugin and will upgrade in the next couple of weeks. I have a serious issue though. I have to manually purge the cache for my new posts on the cryptocurrency news section of the site to show. Have I ticked on/off a setting that’s causing the problem?

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

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

    This is currently the expected behaviour.
    We’re adding some rules for purging related pages such as category archives, the main blog page…, but it’s not ready yet.

    If you want to clear a specific page (such as your news page), you can insert the following code in your theme’s functions.php (if it’s a child theme) or in a mu-plugin.

    add_action('save_post', function($post_id, $post) {
        if ( 'post' == $post->post_type ) {
            WPO_Page_Cache::delete_cache_by_url('https://www.cryptozink.io/news/');
        }
    }, 20, 2);
    

    That way, every time a post is saved (edited or added), the news page will be purged.

    Regards,

    Marc.

    Thread Starter cryptozink

    (@cryptozink)

    Thanks for the quick fix. I’ve added and will test when the next article is published. Again, I’m going to upgrade this week.

    Thread Starter cryptozink

    (@cryptozink)

    I upgraded to premium version as promised for my site crytpozink, turned on lazy load and my site speed shot up. Just wanted to complement you guys. I already gave an excellent review.

    Thank you for the kind words! Glad it works well for you.

    Marc.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Cache Purging Issues’ is closed to new replies.