Title: ESI block is caching
Last modified: March 29, 2022

---

# ESI block is caching

 *  Resolved [mnich209](https://wordpress.org/support/users/mnich209/)
 * (@mnich209)
 * [4 years, 1 month ago](https://wordpress.org/support/topic/esi-block-is-caching/)
 * Hello,
 * I have a problem with ESI block on my custom theme for wordpress. I’m using litespeed_esi_url(
   for minicart, toast messages). When cache is enabled and also ESI after clear
   cache blocks are uncached. After a few sessions / visits ESI block is cached (
   i see in html comment). In filter i have `do_action( 'litespeed_control_set_nocache');`.
   i tried also `do_action( 'litespeed_control_set_ttl', 1 );`).
 * What i weird – on dev server (the same config, i made import/export by plugin
   tool) i cant reproduce this problem.
 * Do you have any ideas how to check / repair this problem?

Viewing 5 replies - 1 through 5 (of 5 total)

 *  [serpentdriver](https://wordpress.org/support/users/serpentdriver/)
 * (@serpentdriver)
 * [4 years, 1 month ago](https://wordpress.org/support/topic/esi-block-is-caching/#post-15508690)
 * Do you use any additional CDN Cache?
 *  Thread Starter [mnich209](https://wordpress.org/support/users/mnich209/)
 * (@mnich209)
 * [4 years, 1 month ago](https://wordpress.org/support/topic/esi-block-is-caching/#post-15508779)
 * Nope, im not using CDN Cache
 *  Thread Starter [mnich209](https://wordpress.org/support/users/mnich209/)
 * (@mnich209)
 * [4 years, 1 month ago](https://wordpress.org/support/topic/esi-block-is-caching/#post-15509110)
 * I Saw that when i make a OPTION request to some url ESI is catching all blocks.
 * How it is possible?
 *  [serpentdriver](https://wordpress.org/support/users/serpentdriver/)
 * (@serpentdriver)
 * [4 years, 1 month ago](https://wordpress.org/support/topic/esi-block-is-caching/#post-15509171)
 * Plugin support has to verify it, but for performance reason it may be that ESI
   blocks are also cached, but with short TTL. For testing create blank PHP file
   and copy this code and request it. If done, cache for ESI blocks should be purged.
 *     ```
       <?php
       header('X-LiteSpeed-Cache-Control: no-cache');
       header("X-LiteSpeed-Purge: private *");
       ```
   
 *  Plugin Support [qtwrk](https://wordpress.org/support/users/qtwrk/)
 * (@qtwrk)
 * [4 years, 1 month ago](https://wordpress.org/support/topic/esi-block-is-caching/#post-15513563)
 * Hi,
 * please enable the debug log , see what logs says when it generates that ESI block.
 * best regards,

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘ESI block is caching’ is closed to new replies.

 * ![](https://ps.w.org/litespeed-cache/assets/icon-256x256.png?rev=2554181)
 * [LiteSpeed Cache](https://wordpress.org/plugins/litespeed-cache/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/litespeed-cache/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/litespeed-cache/)
 * [Active Topics](https://wordpress.org/support/plugin/litespeed-cache/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/litespeed-cache/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/litespeed-cache/reviews/)

 * 5 replies
 * 3 participants
 * Last reply from: [qtwrk](https://wordpress.org/support/users/qtwrk/)
 * Last activity: [4 years, 1 month ago](https://wordpress.org/support/topic/esi-block-is-caching/#post-15513563)
 * Status: resolved