Private caching not working on home page
-
I apologize in advance that this will be a long description/question!
A website I am working on will allow users to register and login, at which time their menus will change to allow access to additional pages. Not only will the main menu change, but there will be certain sections of the home page that also change to include a “welcome user” message plus some additional links available to them. My intention in the long run is to look into using ESI to separately generate the menus and conditional text on the home page. But for now, I thought I could accomplish the same result using the private caching capability for logged-in users.
Unfortunately, it is not working 100%. It works fine on every page *except* the home page. When a user logs in, the home page they see remains the same. The menu is unchanged as are the conditional text portions of the home page. Looking at the headers returned, I see a “x-litespeed-cache: hit” for the home page, but “x-litespeed-cache: hit,private” for all other pages. It seems like the plugin is not recognizing that the user is logged in on the home page.
One point (which might be a red herring): One of the text blocks on the home page is a login form. After a login, the user is redirected back to the home page and the login form is replaced by the “welcome user” message. So I would think the plugin would detect that the user was logged in at this point.
What would cause the plugin to not detect that the user was logged in on just the home page? And, am I misunderstanding how private caching works for logged-in users – should all pages be cached?
Thanks as always for your help!
- The topic ‘Private caching not working on home page’ is closed to new replies.