How can I set up Cloudflare correctly so that it caches only anonymous traffic?

I set a Cloudflare rule to cache all sites. The problem is that this does not work at all. The frontpage is cached and if somebody tries to login the cache is delivering wrong page content. Cloudflare only caches the static data correctly. But how can I setup Cloudflare perfectly so that these caching issues with logged in users do not happen and the static sites are cached nevertheless.

No answers yet