wp2print
Help & Support Center
Search:
Contents
:
IndexBookmarkPrint
Home > System configuration > Optimizing site speed > LiteSpeed Cache settings > Excludes

Excludes

With certain themes, the shopping cart may be cached and will not accurately reflect products that have been added to the cart.

First, let’s find out if your theme has an issue.

  1. On a non-logged-in browser, with the cache active, enable your browser’s code inspector, and visit your shop’s home page. Then, visit a product page. Both of these pages should be newly-cached now.
  2. To verify that a page is cached, using the inspector, navigate to the Network tab, click on the page’s URL in the list (reload the page, if you don’t see it), and then look at the response headers. If you see X-LiteSpeed-Cache: hit, then the currently-loaded page was served from cache.
  3. Perform this check on both pages.
  4. Add the product from the product page to your cart.
  5. Visit the shop home page again, but do so by clicking a link to it from the product page (in other words, don’t use the Back button).
  6. Check to see if the home page is still cached (it should be) and that the cart contains the product you just added to it (it should).
  7. If you’re seeing something different, then you’ll need to update your do-not-cache cookie list.

Here’s how to update your do-not-cache cookie list:

In your WordPress Admin, go to LiteSpeed Cache > Settings > Excludes.

Under Cookie List, enter woocommerce_items_in_cart, scroll down and press Save Changes.





If you’d like to verify that this is working, repeat steps 1-6 above. Unlike before, we should now see that the home page is still cached and the cart is properly updated.





See also


Was this information helpful?YesNo