Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #141725
    Kesiena
    Guest

    Hi there,

    I am using the following plugin: YITH WooCommerce Ajax Product Filter Premium
    The plugin seems to conflict with W3 Total Cache and sometimes the filters don’t render on the page at all. How do I exclude the entire plugin from being cached?
    Do I just exclude /wp-content/plugins/yith-woocommerce-ajax-product-filter-premium/* for example from Never cache the following pages: ?

    I also tried the below:

    “”I added this: /wp-content/plugins/yith-woocommerce-ajax-product-filter-premium/assets/js/yith-wcan-shortcodes.min.js to Never minify the following JS files:””

    An example of a page with the filters is: https://www.welding-alloys.com/application/hardfacing-welding-consumables/

    I already reached out to the plugin developers concerning the above issue, but they were unable to assist. Your assistance will be greatly appreciated.

    #141755
    Marko Vasiljevic
    Keymaster

    Hello,

    Thank you for reaching out and I am happy to help!
    You cannot specifically exclude the plugin from being cached. In W3 Total Cache, you can exclude specific files from the optimization, if Minify is used, or you can exclude specific pages from being cached.
    After checking the plugin you mentioned, this plugin uses Ajax to bypass the cache, meaning depending on the plugin configuration, the cache should not be a problem.
    Can you please share the screenshot of the at plugin settings (General Options)?
    Also if you are experiencing the issue, can you please disable the settings one by one in Performance>general settings, save the settings and purge the cache after each setting is disabled and see which one might be causing the issue?

    Thanks!

    #141967
    Kesiena
    Guest

    Hi,

    Please see screenshot here as requested: https://snipboard.io/lqXZLf.jpg

    Noted. How would you suggest I exclude the core plugin js files from being minified? When I inspect the page I see only yith-wcan-shortcodes.min.js being used, so I added this: /wp-content/plugins/yith-woocommerce-ajax-product-filter-premium/assets/js/yith-wcan-shortcodes.min.js to Never minify the following JS files, but this did not solve the issue.
    The issue is intermittent and only happens after an unknown period of time, so I am unable to test it that way. But I am positive it is cache related as it goes away immediately after I clear the cache or add a ?(query string) to the url e.g. https://www.welding-alloys.com/application/hardfacing-welding-consumables/?123.
    When the issue occurs, the filter on the left hand side of the page is completely blank. On inspection, I see the html is not rendered at all and there are no js errors on the page.

    Please let me know if you have any suggestions? For now I will exclude all the js files in the plugin folder from being minified and I also added the below to purge the cache automatically every hour.

    // Flush W3TC Cache Automatically hourly
    function ql_flush_w3tc_cache() {
    $w3_plugin_totalcache->flush_all();
    }

    // Schedule Cache Clearing Process
    function ql_flush_cache_event() {
    if ( ! wp_next_scheduled( ‘ql_flush_cache_event’ ) ) {
    wp_schedule_event( current_time( ‘timestamp’ ), 3600, ‘ql_flush_w3tc_cache’ );
    }
    }
    add_action( ‘wp’, ‘ql_flush_cache_event’ );

Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘How to exclude entire plugin from being cached’ is closed to new replies.