Don't Cache WooCommerce Pricing

#1
Hello. We help manage a site whereby pricing changes every few minutes. This is done automatically in the background via a cron job, and updates all the products pricing with a calculation (based on weight).

The problem router login we are experiencing is that these prices don't appear to update until we clear the litespeed cache.

Is there a method of excluding woocommerce product pricing from what is cached? I'm not particularly familiar with litespeed as we usually just turn it on and it works, but happily to learn if someone can point me in the right direction! Thank you.
 
Last edited:

serpent_driver

Well-Known Member
#3
@tanini

The price element is an omnipresent element that can be seen throughout the shop. There is LiteSpeed ESI with which you can assign different cache rules to certain areas, also called ESI holes, but in the case of the price, the whole shop would only consist of holes and each ESI hole reduces the cache performance and thus the loading time . That's why I don't see ESI as a solution. It would be smarter to slightly modify the cron and set a purge cache header after the cron finishes. This automatically purges the cache. However, you then have to make extensive use of the built-in cache crawler to keep the cache warmed up.
 
Top