What is ESI Hole Punching

Dynamic caching: Cache full page but serve personalized content.

LiteSpeed ESI Support

Enterprise feature – allows caching pages with dynamic widgets (cart, login).

Enable ESI in Plugin

LiteSpeed Cache → Cache → ESI tab → Enable ESI.

Implementation Examples

WooCommerce Cart Widget

Use LSCache ESI nonce for cart count and mini-cart.

Custom ESI Block

<!--esi on-->
<?php echo do_shortcode('[dynamic_content]'); ?>
<!--esi off-->

ESI Use Cases Table

Use CaseBenefit
Cart widgetAlways current count
User login statusPersonalized greeting
Dynamic adsTargeted content
CommentsFresh comments on cached page