Buy B2BKing
$299 $199
If you're experiencing an issue where users see content they aren't supposed to see, such as content meant for a different user group or category of users, here's what you need to know:
This kind of issue is usually indicative of a cache configuration problem. It is often caused by cache plugins such as WP Rocket, LiteSpeed Cache, W3 Total Cache, etc., or by caching at the hosting level.
Cache plugins work by creating a snapshot of your site at a given point in time and then showing users that snapshot rather than the live site (this is much faster).
However, when you have different content for different users, those users cannot share the same cache (snapshot)!
To solve this problem, you must either enable a unique cache for each logged-in user (the best solution if available) or disable caching for logged-in users entirely.
Popular cache plugin configurations:
(1) WP Rocket
When using WP Rocket, the best approach is to enable their user cache setting. This enables a unique cache for each logged-in user, making it a great and effective solution that maintains good performance.
(2) LiteSpeed Cache
With LiteSpeed, we're not aware of any way to enable a unique cache for each user. Therefore, we recommend disabling caching for logged-in users through the following setting:
(3) Other Plugins
Most other cache plugins have a setting to disable caching for logged-in users, which is our recommended approach.
Another alternative is to disable caching for specific user roles, but to use this you would first need to sync B2B groups with WP roles, which adds more complexity to the setup.
Sometimes caching is added by hosting companies and isn't necessarily visible or done through a plugin.
One way to check whether your hosting adds caching is to make a site change — such as switching the theme — and see if the change is immediately reflected on the front end. If you switch to a different theme but still see the old design initially, it's likely that your hosting has a caching mechanism in place.
In such cases, it's best to check your hosting settings and/or contact your hosting provider directly for advice.
Powered by BetterDocs