Wordpress LScache Plugin: Make section of page none cacheable
Last Updated on: Wed, 15 Apr 2026 00:00:02 I use code snippets plugin to display delivery date estimates with below code add_action( woocommerce_after_add_to_cart_form, abanista_dispatch_info_single_product ) function abanista_dispatch_info_single_product() date_default_timezone_set( Africa/Kampala ) // if SAT/SUN delivery will be MON if ( date( N ) >= 6 ) $del_day = date( l jS F , strtotime( next monday ) ) $order_by = Monday // if MON/FRI after 2PM delivery will be TOMORROW elseif ( date( H ) >= 14 ) $del_day = date( l jS F , strtotime( tomorrow ) ) $order_by = tomorrow // if MON/FRI before 2PM delivery will be TODAY else $del_day = date( l jS F , strtotime( today ) ) $order_by = today //if item is on Backorder add 1 week and 4 days $bodel_day = date( l jS F , strtotime( +1 week 4 days ) ) $html = Order by 2PM $order_by for delivery on $del_day or $bodel_day for Pre-orders & Backorders echo $html Expand But litespeed cache is caching this section so people are served with cached dates and times. How do I ensure that litespeed Excludes this section of page from cache while keeping the rest of the page cached? Hi, You can use our ESI feature in this case. Please refer to this page: https://docs.litespeedtech.com/lscache/lscwp/cache/#esi-tab for detail information about ESI. Regards, Lehan And this page as well: https://docs.litespeedtech.com/lscache/lscwp/api/#esi Regards,
LiteCache Rush: Speed comes from using less, not from doing it faster
Reference