When user cache is activated, WP Rocket creates a dedicated set of cache files for each logged-in WordPress user.
This is great when you have user-specific content on your website. The site will be cached as normal for any visitor that is not logged in, using one set of cache files, and for each logged-in user using a separate cache.
Logged in user cache is useful when you have a membership site, or similar when users must log in to see content.
User not logged out correctly
If there seems to be confusion about the logged-in or logged-out status of a user, it could be due to the fact that you have custom login or logout pages.
WP Rocket does not cache the default WordPress login/logout URLs. But if you are using custom URLs, WP Rocket will not be aware of them, so you should manually exclude those URLs from the cache:
Exclude pages from the cache
Custom login cookies
If you use a plugin that sets custom cookies for detecting the logged-in/logged-out status of a user, you may need to add those to the cookie exclusion option in the Advanced settings tab:
Login/logout menu items
If you are looking for a plugin that can dynamically add login/logout links to your menu, we recommend the following, because it is cache-friendly:
🔌 Login Logout Menu plugin
No preloading for user cache
Preloading does not work for user cache. Neither one of WP Rocket’s preload processes can “log in” as a specific user to preload an individual caches. The preload process will just preload the general cache for visitors as usual.
Deprecated: Same cache for all logged-in users
WP Rocket 2.9 had introduced a new option to use the same set of cached files for all logged-in users, instead of a set of cache files per user (while still using a separate cache than for normal visitors, of course).
That option turned out highly confusing, so it was removed from the user interface again in WP Rocket 2.10.
Heads up, developers! You can still use this feature by passing a value of
true to the
rocket_common_cache_logged_users filter. However, we recommend you thoroughly scrutinize its use as it may result in misplaced content very easily. When in doubt, always disable this feature first!