Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author petermolnar

    (@cadeyrn)

    There is a field in the settings to exclude based on regex matches, but since I’m not familiar with woocommerce, I cannot explicitly tell what to do.
    The field is at Settings -> WP-FFPC settings -> Cache exceptions -> Don’t cache following URL paths.

    Thread Starter natuurlijkhosting

    (@natuurlijkhosting)

    Ok, thanks. My shoppingcart is at domain.com/winkelwagen – do I just put in:

    /winkelwagen or do I use ^/winkelwagen ?

    And do I put every expression on another line?

    Thanks so much for your quick response!

    Niels

    Peter,

    http://docs.woothemes.com/document/configuring-caching-plugins/
    Exclude pages from caching:
    •Cart
    •My Account
    •Checkout
    •addons
    •?add-to-cart=”

    Most widget that display Cart Totals, Items, work with JQuery to keep the Shopping Cart widgets dynamic.

    I tried these Expressions and they seem to be working..

    /checkout/(.*)
    /my-account/(.*)
    /addons/(.*)

    The ?add-to-cart=” is not needed because wp-ffpc does not cache that url pattern, automatically.

    As I said above, most people that are having issues with the Cart Totals and Item numbers are issues with the Ajax/Jquery and conflicts with other plugins. Using the browser “Chrome” and the More Tools- Java Console, will help you find any conflict.

    PeterMolnar, am I correct with the Expressions?

    Rafael
    Magician & Parttime Geek
    http://www.rafaelmagic.com

    I updated the code:

    ^/cart(.*)
    ^/checkout(.*)
    ^/my-account(.*)
    ^/addons(.*)
    ^/shop(.*)

    In Woo Commerce you can select the name of your Shop, Cart. So the code above might be different in case your using a custom name.

    Also in the WP-FFCC-Settings-Cache Exceptions-Dynamic Requests (Exclude every URL with “?” in it.)
    *Make sure to check mark it.

    Its working for me on mobile and desktop.

    I am also running APCu and I am not sure if this works with the other Backend Storage Driver, memcached, memcache. In theory it should.

    Will report on any code changes. Can someone else confirm.

    Code updated. Cart is dynamic and working. Check the HTML debug comments.

    Add the following:

    ^/wp-|cart|checkout|my-account|shop|addons|blog

    To Test that its working and Not being Cached.
    Go to Wp-ffpc-debug & in-depth and select Add HTML debug comment

    That will add HTML comments to the bottom of the page when you right-click and view source. If you see comments its being Cached. No comments your in business. Comments will look like the Sample below. I am using apcu which is why my cache engine. Server ip blocked.

    Comments Samples:
    <!–
    WP-FFPC
    cache engine: apcu
    page generation time: 1.391 seconds
    generaton UNIX timestamp: 1425024581
    generaton date: 2015-02-27T08:09:41+00:00
    server: 192.blah.blah.blah
    –>

    @petermolnar in your plugin what does the expressions ^ & (.*) do?

    Plugin Author petermolnar

    (@cadeyrn)

    rafaelmagic

    to avoid confusion with the HTML debug comment, I’ll alter it in the next release, 1.8.4.

    The cause of the confusion was that the debug comment was added when the cache entry was generated and not when it was actually served; therefore it was part of the output by default.

    rafaelmagic

    (@rafaelmagic)

    PeterMolnar,

    Nothing wrong with the HTML comment.

    The confusion is the proper syntax to exlude pages from being cached.

    Your a smarty pants Php programmer and we are noobs.

    The easiest solution is to have a FAQ entry. I personally still have no idea about the use of the ^ or wildcards.

    Share some samples to exclude pages that regular people can understand. It took me several tries to come up with the code below.

    ^/wp-|cart|checkout|my-account|shop|addons|blog

    What’s the ‘ ^/ ‘ code for?

    Plugin Author petermolnar

    (@cadeyrn)

    that field accepts regular expressions; there is a brilliant site https://regex101.com/ to test them.

    The ^ means the beginning of the line; / is literally a /; | is an ‘or’, but there are much more sophisticated options with regular expressions.

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

The topic ‘Setting woocommerce’ is closed to new replies.