Magento2 Litemage No Cache Block

I've just recently installed Litemage in my magento demo store (, yet I currently running an issue with ESI - hole punching. When it was implemented with varnish, setting up a ttl=10 within a block solve the issue, however this is not applicable within Litemage.
<block class="Startupwebshop\Baseconfig\Block\OpeningTime" name="header-text-block" before="-" ttl="10" template="Startupwebshop_Baseconfig::header-text-block.phtml" />
I've been searching for documentations, forums post, etc. Most troubleshooting guide only applies for Litemage Magento 1 instead of Magento 2. Instead what I found mostly related to cacheable=false. Yet within the following articles, there isn't any solution how to fix it with hole punching a block. As a matter of fact, it would be easier if within the backend / admin in Magento, there is a field to add which block requires hole punching at a given period.

Sorry if I missed at reading post / documentations somewhere as I am non-backend developer.
Last edited by a moderator:


LiteSpeed Staff
Staff member
I see the header has "litemage,hit". Which part you want to do hole punch? Can you show a screen shot with the block? With LiteMage on and off. Also why do you only set for 10 secs? that will slow down the whole site.
Hi Lauren.
Yes I have no problem with litemage caching. It works fantastic, however there is a block that I don't want to cache in the header or at least with short ttl of 10 - 60 seconds.

Attached here is the area where I dont want it to cache.
The reason is because there is a php openning time checker (marked with the green dot). PS: It's currently work in progress to be transformed into Javascript. Yet I still think it should have been easier to make this simple block non-cacheable or short TTL time.



Staff member
We might need to further clarify with your requirements. Could you join our slack channel for further discussion?

join our Slack channel GoLiteSpeed:
Slack gives you the option to speak directly to the team here at LiteSpeed and also other LiteSpeed fans.

After you join, you will be in general, random, and wpcache channels by default. Click "Channels" in the left panel, then Join "litemage2_magento2" channel for further discussion.
I have joined the slack channel and I will still post the updates here upon how to resolve the issues (when I found / figure out the solutions).