Wordpress LScache Plugin: ESI in separate PHP thread?
Last Updated on: Wed, 15 Apr 2026 00:00:02 Hi Im evaluating ESI for our membership site. Logged out experience simply uses full page caching for most pages. For logged-in, some areas of the site contain data pertinent to the logged-in user (name, profile and account options etc). Whilst Ive got this section serving as privately cached via the esi:include tag it seems to operate in its own PHP thread so initially had no knowledge of WordPress. This meant I had to require wp-load.php to get the include to appear on site. (it was throwing a fatal error otherwise). The issue with that though, is the ESI include then doesnt have any idea what post type has called it so I lose my breadcrumbs and some other output info that relies on post type detection. Id prefer not to transfer this into a shortcode if at all possible. Am I doing something wrong? Our hosting company were really helpful at getting it set up but they drew a blank at this stage. Hi, If you are using LiteSpeed Cache plugin , then you probably should not use standalone ESI call , please integrate with LSCWP API for your ESI block. Best regards, Thanks for that ? Ive made a stab at using the API just waiting on confirmation from our hosts that we are indeed serving a privately cached block. Unless theres an obvious way in Chrome devtools to tell? I can see image assets within the block being served from memory cache ? but figure that could easily be our Cloudflare/Litespeed non-ESI cache doing that? It might also be helpful in the wiki to explain to people if youre using the plugin to not use ESI tags and to make use of shortcodes or the API instead? Hi, Im sorry I didnt understand your question. If you want to check if anything is served by API (or ESI) , you can enable LSCWP debug log , it will log when you create ESI block. Best regards, Its OK I tested by putting a timestamp output within the element I wanted to cache privately to see that it was working. All good now ? thanks for the help.
LiteCache Rush: Speed comes from using less, not from doing it faster
Reference