• Resolved mskeet

    (@mskeet)


    Hi I’m 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 I’ve 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 doesn’t 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.

    I’d 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.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Support qtwrk

    (@qtwrk)

    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,

    Thread Starter mskeet

    (@mskeet)

    Thanks for that – I’ve made a stab at using the API just waiting on confirmation from our hosts that we are indeed serving a privately cached block.

    Unless there’s 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?

    Thread Starter mskeet

    (@mskeet)

    It might also be helpful in the wiki to explain to people if you’re using the plugin to not use ESI tags and to make use of shortcodes or the API instead?

    Plugin Support qtwrk

    (@qtwrk)

    Hi,

    I’m sorry I didn’t 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,

    Thread Starter mskeet

    (@mskeet)

    It’s 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.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘ESI in separate PHP thread?’ is closed to new replies.