This is an old revision of the document!


How to Configure Inaccurately-Cached Blocks of Information

You may encounter blocks of information that are incorrect when caching is enabled. For example:

There is a delivery box shown after the product size is selected. When there is no caching enabled, it accurately reads:

Order in the next 0 day 23 hours 28 minutes for delivery on Fri 27th of October when you choose DPD Next Day Delivery at the checkout

After LiteMage is enabled, the delivery box shows an out-of-date countdown. This is because the page's TTL is inappropriately long for that particular block of information.

Can we use the Do-Not-Cache Subroutes box? No, it is not about Do-Not-Cache Subroutes,it is about proper hole punching.

If this delivery time is the same for all products, then it should be configured as a public ESI block, like the footer block. If some information is specific to logged-in users, then it should be configured as a private ESI block.

Regardless of whether it is a public or private ESI block, you will need to add hole punching to that block. Punch a hole and assign it a small TTL such as 5 minutes. The countdown will then be accurate to within 5 minutes (or whatever TTL you set).

In orer to create an ESI block, you will need to take a look at your applied module's code. Modification of some template code and layout files may be required. Please refer to this example to see how to punch a hole for a new ESI block.

If you are an experienced Magento PHP developer, you can make the necessary changes yourself. Otherwise, you may simply engage us through LiteMage Premium Support. LiteMage Premium Support is fully refundable if we fail to enable LiteMage Cache for your site.

  • Admin
  • Last modified: 2017/10/25 15:22
  • by Lisa Clarke