Disabling cache in edit-mode

When the block- or pages-cache is turned on, the templates-variables get cached. So for example $c->isEditMode() doesn’t work.
Is there a way to disable cache, when you’re logged in as an editor?

I found the option myself:
protected $btCacheBlockOutputForRegisteredUsers = false;