Wordpress LScache Plugin: Exclude Dynamic Menu and Shortcode Content
Last Updated on: Wed, 15 Apr 2026 00:00:02 Hi, I need to exclude parts of my homepage from cache. On my homepage, the elements to exclude from cache are : 1- A dynamic menu : Variable if the user is logged in or logged out 2- A dynamic content placed thanks to a shortcode 1> For the menu, how to exclude it from the cache ? To manage login status, I use the plugin User Menus . May I use the ESI Nonces for that ? 2> For the dynamic content with the shortcode, I know about the esi to include in a shortcode (https://www.litespeedtech.com/support/wiki/doku.php/litespeed_wiki:cache:lscwp:configuration:esi:shortcode), but how to manage it for my use case ? Thank you for your help, Regards, Law Hi, 1) you can try to use cache login user , that will make 2 caches , 1 for guest user, 1 for login user 2) what do you mean how to manage it ? ESI shortcode didnt work ? Best regards, Hi, 1/ Thank you 2/ Oh I should have misunderstood how it works. So on a cached page, put [esi shortcode ?] will not cache the content of shortcode ? If it is that, thats perfect. Regards, Law Hi, Yes, on a cached page for example you have a block [something] , page cached and this code wont be changing and then if you make it , [esi something ttl=0 ] , then this block will no be cached while parent page can still be cached. and , in other case, [esi something ttl=3600 ] , then this block will be cached for one hour and so on. but currently , ESI shortcode only works with single shortcode, some plugin uses short code like this [some]xxx[/some] , in this case, ESI wont work properly Best regards, perfect, many thanks ! Hi, So Ive tried : ? Activate ESI button ? Put my shortcode with ttl=604800 But it made my website incredibly slow, and timeouts in the Admin. When I removed the shortcode, the site remained very slow. Its been solved when disabling ESI. Would you see some incompatibilities of ESI with Cloudflare that I use, or with something else ? Thank you, Regards, Law Hi, ESI wont effect in wp-admin URL when you enable ESI, please check in HTML source code , search for keyword
LiteCache Rush: Speed comes from using less, not from doing it faster
Reference