Support » Plugin: LiteSpeed Cache » ESI WooCommerce and other questions

  • Resolved Web Guys


    Hi there,

    I’m currently testing Litespeed (I think enterprise) on a trial license (thinking about moving from Apache to Litespeed).

    I’m developing quite a complex WooCommerce store and have a few questions;

    1. I’ve enabled ESI (and ESI has been enabled server side as well). Will ESI work ‘out of the box’ with WooCommerce? I.E. Do I need to configure anything apart from enabling ESI?

    2. The store will have hundreds of users/customers. Is my understanding correct, if I don’t have ESI enabled but do have the ‘Cache Logged-in Users’ enabled, that will create a Private cache page, for each page visited, for each front end (shop) user?
    E.G. Lets say the site has a 100 pages and 50 shop front end users, does that mean it will potentially create 5000 Private cached pages?
    But if I enable LSI then it will use a combination of public (for static content) and small sections of private (small file size) cache pages?

    3. And I don’t really understand the benefit of private cache pages or even ESI for logged in users. What I mean is, for complete Public cached pages (offered to users NOT logged in), I can preload the cache using your crawler, that’s great and super fast.

    But I assume I can’t use the crawler to preload the Private cache pages, because they’re only cached for each user, when they visit a certain page (?)
    If this is correct, what’s the benefit because the page will be cached locally in the local browser cache anyway. So without Private caching, when the user visits the page the 2nd time, it will load from the browser’s cache anyway.
    I guess the only benefit I can think of is the user can be offered Private cached pages from multiple devices.

    Am I missing some other benefit of Private and ESI caching?

    4. Re the crawler, is my understanding correct regarding how it works;
    So it builds the index / preload the (public) cache (which for me is taking around 7 mins for 110 pages) first. I can see it’s set to run every 10 mins. Does that mean it will recheck the cached pages every 10 mins and re-cache any pages that have changed? I thought if I make a change to a product or a general WP page, it rebuilds the cache for that product or page anyway?
    I guess I’m just not quite understanding the point of the crawler, apart from the initial preloading of the cache.

    5. I’m not a huge fan of combining CSS and JS or try critical CSS, as I’ve had all sorts of issues with other plugins. It seems fine then breaks on some rare combination of circumstances. And since I have HTTP2, I tend to not bother combining.
    I think I’ll keep the CSS and JS not combined with my Litespeed testing, but I would like to use the other features;
    – CSS and JS HTTP2 Push.
    – And possible try HTML, CSS and JS minify.

    If I enable the Push and Minify (but not enable the combine), will this work?
    I’m asking as other plugins I’ve tested need the combine in order for the push to work (for whatever reason).

    6. Are there any other optimization tips you have to improve WooCommerce performance? Such as object caching?

    7. I noticed the pages are now using brotli compression, which is great. Is this something which is enabled by default in Litespeed webserver? I’m just a bit concerned about a double compressions issue (can happen in Gzip, not sure if it’s a potential issue in brotli).
    Before moving to Litespeed, I would enable Optimise Website in the cpanel account and make sure I didn’t enable Gzip in any WP plugins (because of the double Gzip issue). This would Gzip files fine.
    But now I’ve moved to Litespeed, should I disable the Optimise website in Cpanel, because Litespeed handles this already?

    8. This final question isn’t to do with the caching side of Litespeed but a general question re performance on the Litepseed web server.
    For pages that are not cached, I’m getting a TTFB of 2 to 3 seconds, where I suppose the server is processing/building the HTML page dynamically. Is there any tweaks I can do on the Litespeed webserver to improve this?
    Or is it just a case of throwing more server CPU power?
    In case it makes a difference, I’m using Cloud Linux, Cpanel and WHM with Litepseed.
    I know that there are other factors involved with TTFB such as the number plugins etc but I’m specifically asking re the Litespeed webserver side of things.

    Thanks in advance and sorry about the wall of text!


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



    That’s a really a wall of text 🙂

    1. on default storefront theme , yes , but situation may vary depends on theme and other plugins involved

    2. that’s correct , if you don’t enable ESI , each individual login user will have individual caches, when ESI is enabled , it will use public cache with ESI block.

    3. your idea is kind of right , but the things is , you will probably NOT want user to load browser cached page, it pretty much defeats the purpose for using dynamic system like wordpress , as far as I know , there is no way you can flush user’s browser cache , and the only way to flush the browser cache is set cache-control: no-cache which is same tell browser not to cache the page…

    and technically , you can also pre-cache the login user as well , please check this wiki

    crawler has role simulation and cookie simulation for login users to pre-cache.

    4. yes , after initial crawler , it will crawl again , and if it sees “x-litespeed-cache: hit” header, it will skip this page and continues to next until it finishes the URLs in sitemap

    it rebuilds the cache for that product or page anyway

    eventually it will be cached again by either users or crwaler.

    5. I am not exactly sure what do you mean , but yes, I do see from time to time , when combine or minify breaks something , but usually it just fixed up by excluding the troubling JS/CSS files from being optimized.

    6. object cache would slightly improve the performance , but this also depends on your PHP code , like how many objects it needs to load …etc

    (I think) as you are a sysadmin , you can also try tweak it from LSWS server side for some PHP parameters

    7. it won’t mess up , unless you have PHP-side enabled gzip, the cPanel compression option won’t break anything.

    this wiki could give you some more info about compression

    8. this actually same as 6 , please check this wiki

    but frankly at this point , there is no much can be done by LiteSpeed , only thing you can do is like keep PHP process running in idle to ready to take request , instead of launch a new one , this saves some times for PHP fork , but kind of negligible , you will see need to tweak your PHP code to make it more “elegant”

    Please let me know if I miss any questions or anything that isn’t clear.

    Best regards,

    Thread Starter Web Guys


    I just wanted to say thanks for the info, useful 🙂

    Plugin Support qtwrk



    No problem 🙂

    Please let us know if you have any further questions.

    Best regards,

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘ESI WooCommerce and other questions’ is closed to new replies.