• Resolved gemplan

    (@gemplan)


    Hi,

    I’m using Super Page Cache for Cloudflare and looking for a way to disable all automatic cache purging that happens when posts, pages, or products are updated.

    In my setup (WooCommerce store with regular inventory syncs), every small change triggers a purge, which leads to unnecessary cache invalidation and performance issues.

    Is there a way—via settings or filters—to completely disable automatic cache purging on content changes?

    I’d like to handle cache purging manually via cron or API.

    Environment:

    • WordPress 6.x
    • WooCommerce (latest)
    • Super Page Cache (latest)
    • Server: Cloudways / NGINX + Varnish

    Thanks in advance!

    Let me know if there’s a recommended approach.

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

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support Poonam Namdev

    (@poonam9)

    Hi @gemplan,

    At this time, Super Page Cache for Cloudflare does not include a built-in setting to completely disable automatic cache purging when posts, pages, or products are updated. However, you can take advantage of the following filter to override the list of URLs the plugin attempts to purge:

    add_filter('swcfpc_post_related_url_init', function($listofurls, $postId) {
    // Return an empty array to prevent automatic purging on content updates
    return [];
    }, 10, 2);

    This filter allows you to stop the plugin from generating purge requests based on content changes.

    ⚠️ Please note: This approach is intended for developers or users comfortable with PHP customization. If you’re not sure how to implement this safely, we recommend working with a developer or hosting provider who can help apply it within your environment.

    Let us know if you have any other questions!

    Thread Starter gemplan

    (@gemplan)

    Hi

    I alrwady try filter swcfpc_post_related_url_init but it didn’t work

    Thanks

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Disable automatic purge on post edit’ is closed to new replies.