Caching & Preload for Logged-in Users
-
Hi all!
I have an issue with caching and preloading pages for logged-in users.
So, my website is visible only for logged-in users (intracorporate) and the only one way to log in is to use corporate google account. In functions.php there is the code, which redirects all unauthorized users to the login page (custom made).
So, if I turn off this redirection, every caching plugin works great, TTFB reduces to 40 ms (light speed!). When I turn on this redirection, TTFB becomes 2-3 sec (tooooo long) and causes even Connection Timeout error, when too much users try to load the website at the same time (due to heavy request processing in backend).
Some caching plugins allow to cache pages for logged-in users, but it works like this: when User A visit the page for the first time, he have to wait 2-3 seconds. Then, if he reload the same page, it loads immediately (40 ms). But it is cached only for him, so when User B tries to load the same page for the first time, he also have to wait about 2-3 seconds.
That’s because caching plugin “surf” the pages like unauthorized user, and can see only login page due to redirection.
As I can understand, there are 2 ways to resolve the issue: 1) force plugin to preload pages somehow, even for logged-in users (by the way, i don’t need individual versions of cached pages for each user. they looks the same for each user), 2) force plugin to deliver cached page to User B, if User A already visited this page (as I said, I don’t need individual versions)
The page I need help with: [log in to see the link]
The topic ‘Caching & Preload for Logged-in Users’ is closed to new replies.