Wordpress LScache Plugin: Caching Logged-in Users
Last Updated on: Wed, 15 Apr 2026 00:00:02 I noticed that for logged-in users (admin), I always get this is Profiler: cache-control: no-cache, must-revalidate, max-age=0 This causes some FOUC. I have enabled Cache Logged-in Users. And I have verified my LiteSpeed server version is 5.4 Users who are not logged-in received cache version properly. How do I serve cached contents to logged-in users as well? Thank you. The page I need help with: https://www.zhouruopeng.com This header has nothing to do with LScache plugin for WordPress.This header is for browser caching and is controlled either by WP itself or has manually been set in .htaccess. Normally this header is used for static sources like CSS, Javascript. If you want to verfify if LScache plugin works check response headers for: x-litespeed-cache: hit or miss If you have any dysfunction check your Cloudflare settings. Cloudflare may cause it. x-litespeed-cache-control: no-cache,esi=on The above is found for logged-in user (admin) While logged-out user gets a hit. Meanwhile, CloudFlare development mode has already been turned on. Thank you. Hi, cache-control: no-cache, must-revalidate, max-age=0 this is browser cache header, and it is default value for WP I am not sure how would this cause FOUC ? x-litespeed-cache-control: no-cache,esi=on this usually happens during user first access, after that it should be cache hit if you have enabled cache login user Best regards, For the time being, lets ignore the FOUC issue first, because I went through a lengthy session with support, we never really got to the bottom of it. However, I eventually discovered FOUC doesnt happen to users who are not logged in. It seems to only happen to logged in users. Which led me to investigate caching. If I am logged in, visit a page for the first time, there should be no cache version. That I understand. However, should I be getting a cached version when I refresh? I dont think I am getting a cached version because I see this x-litespeed-cache-control: no-cache,esi=on or x-litespeed-cache-control: miss Please advise. Thank you Hi, Please provide the report number first , you can get it in toolbox -> report -> click send to LiteSpeed after that , you can follow this guide to enable debug log and see if it says anything for why not caching the login user Best regards, Report sent. And I followed the guide and discovered something interesting. The cache wasnt happening due to an item in cart (I didnt realize it was there). I removed the item, and caching hit, for both logged-in and logged-out users. Later, when I add items into cart, caching continues to work. I really dont understand what happened before, but all seems fine. I no longer get FOUC when logged in. If you can provide a guess of what happened, thatd be great. If you cant guess, its fine too. All good now. Thank you very much for the tip. Hi, well, if you can reproduce the issue , check the debug log , it should always tell something useful , if you are not sure what it means, you can post it here , we will interpret it for you Best regards,
LiteCache Rush: Speed comes from using less, not from doing it faster
Reference