{"id":16688421,"date":"2023-04-26T10:33:22","date_gmt":"2023-04-26T10:33:22","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/problem-with-esi-shortcode\/"},"modified":"2023-04-26T10:33:22","modified_gmt":"2023-04-26T10:33:22","slug":"problem-with-esi-shortcode","status":"publish","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/problem-with-esi-shortcode\/","title":{"rendered":"Problem with ESI Shortcode"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Hi,<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I need few elements to have very less Cache time and so I added them as Shortcodes with ESI as given below.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;?php echo do_shortcode('&#091;esi asx_price ttl=\"30\"]'); ?&gt;<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">It&#8217;s working fine but after few days, these Shortcodes not returning anything and just empty. Please see below for rendered output with blank data.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;h4&gt;&lt;!-- lscwp esi-shortcode --&gt;&lt;!-- Block generated by LiteSpeed Cache 5.3.3 on 2023-04-25 16:42:06 --&gt;&lt;!-- lscwp esi-shortcode esi end --&gt;&lt;\/h4&gt;<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">But when <strong>I flush LiteSpeed Cache<\/strong>, it starts working again and an example of the rendered output of Shortcode is given below.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;h4&gt;&lt;!-- lscwp esi-shortcode --&gt;&lt;a href=\"https:\/\/www.example.com\" target=\"_blank\"&gt;ASX:  $0.105 &lt;span class=\"green\"&gt;0%&lt;\/span&gt;&lt;\/a&gt;&lt;!-- Block generated by LiteSpeed Cache 5.3.3 on 2023-04-26 10:23:22 --&gt;&lt;!-- lscwp esi-shortcode esi end --&gt;&lt;\/h4&gt;<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">This issue is appearing in all my sites and can you let me know what&#8217;s wrong with this and why only these Shortcodes rendering blank output after a few days when I manually flush LiteSpeed Cache?<\/p>\n","protected":false},"template":"","class_list":["post-16688421","topic","type-topic","status-publish","hentry","topic-tag-esi"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/16688421","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/16688421\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=16688421"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}