• I’m wondering if anyone else has had trouble with the combination of ShopWP and the LiteSpeed cache. ShopWP was working fine with the LiteSpeed cache before the update to v4.

    What happens is that shopwp initially works, then a couple of days later the collection that I’m showing on the bottom of my site fails.

    I’ve tried a number of different things. I’m wondering if anyone else has a solution.

    Here’s what I have done so far.
    1. Added in the prefetch URL’s as per the upgrade guide.
    2. Turned off the JS Minify
    3. excluded the wpshopify css from the cache
    4. excluded the wpshopify from the js cache

    Any ideas would be appreciated.

    Thanks!

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

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author andrewmrobbins

    (@andrewmrobbins)

    @jessedw44 Hey there,

    Can you try turning off the Cache REST API setting for me?

    There are other plugins out there that experience the same thing. For example, here’s a page outlining the same issue from WP Simple Pay:

    https://docs.wpsimplepay.com/articles/rest_cookie_invalid_nonce-cookie-nonce-is-invalid-cookie-check-failed/

    My main suggestion is to tell LiteSpeed to ignore ShopWP altogether. You can do this by excluding whole pages from being cached if need be.

    Plugin Author andrewmrobbins

    (@andrewmrobbins)

    @jessedw44

    Just a quick follow up on this.

    I think the main issue here is that LS is caching the WP Rest API nonce. WordPress expires these nonce’s every 12 hours. https://legacy.joshpress.net/wordpress-nonces-and-wordpress-caching/

    So, if LS outputs an “expired” nonce the plugin won’t be able to load the products.

    If you open up the LS cache settings and click the TTL tab, add 36000 to each field. This will purge the cache every 10 hours. This _should_ fix the issue.

    I am experiencing the same issue.
    Here’s what I did:
    1) in the LSCache settings , cache tab, turned off the Cache REST API setting
    2) in the excludes tab, in the “Do Not Cache URIs” box, entered the Products list page and the individual product page
    (note, for the individual pages you can use ^/products, and this will exclude the products that have that at the beginning of the URL)
    https://docs.litespeedtech.com/lscache/lscwp/cache/

    3) as mentioned above , I lowered the TTL to 32000 on these:
    Default Public Cache TTL
    Default Front Page TTL
    Default Feed TTL
    Default REST TTL (which shouldnt be cached anyway)

    This should be sufficient to alleviate the issue.

    Hope this helps

    Plugin Author andrewmrobbins

    (@andrewmrobbins)

    @colbyalbo Thanks for the follow up! Hope this helps others as well.

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

The topic ‘ShopWp and LiteSpeed Cache’ is closed to new replies.