• Resolved jazura

    (@jazura)


    Hello, I have been using a cache plugin (W3 Total Cache). However, my complete page cache keeps getting cleared / purged all the time.

    After investigating the logs, I noticed that the ‘culprit’ is the SO widgets bundle. More specifically in compat.php there are several functions that call for a post cache ( w3tc_flush_post ) or a full cache purge ( w3tc_flush_all )

    Can I prevent this cache purge by the SO Widgets bundle ?

    • This topic was modified 2 months, 3 weeks ago by jazura.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support Andrew Misplon

    (@misplon)

    Hi, thanks for getting in touch.

    The Widgets Bundle compatibility code (in compat.php) is designed to notify caching plugins—like W3 Total Cache, Swift Performance, Hummingbird, Breeze, LiteSpeed, and WP Rocket—that a widget’s stylesheet has been added, deleted, or cleared. This ensures that if any widget-related style changes occur, your visitors aren’t served an outdated (cached) version of your site. In other words, when widget styles change, the cache is purged so the new styles appear immediately.

    The following filter can be added to a plugin like Code Snippets, a custom functions plugin or perhaps a child theme functions file to stop the cache being cleared on Widgets Bundle CSS delete, clear or add.

    add_filter( 'siteorigin_widgets_load_cache_compatibility', '__return_false' );
    Thread Starter jazura

    (@jazura)

    Yes ! Seems to work nicely. Thank !

    Plugin Support Andrew Misplon

    (@misplon)

    Super, glad to hear the filter helped. All the best with your site.
    Cheers, Andrew

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