Limit the cache of elements on the site - WP

Hi, I have an element on my WP e-shop in the top bar that displays this information Login / Register or the user’s username. After switching to Cloudflare, this username is cached and another user on another device sees that they are logged in even though they are not. Do you know how to solve this situation?

I had to disable caching for logged in users but the site is slow so I would need to fix this situation.

I use Cloudflare with WP Rocket and the Flatsome template.

You can’t have it both ways. Cloudflare does not keep separate caches for every user. If the site is slow for logged in users, you need to address this problem at the source (your server).

Everything worked fine without Cloudflare. It’s cached here by Cloudflare because logged in users don’t have a cache.

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.