public function tagUserContext(FilterResponseEvent $event)
    {
        $response = $event->getResponse();
        if (!$response->isCacheable()) {
            return;
        }

        if ($response->headers->get('Content-Type') !== 'application/vnd.fos.user-context-hash') {
            return;
        }

        if (!$response->getTtl()) {
            return;
        }

        // We need to set tag directly on repsonse here to make sure this does not also get applied to the main request
        // when using Symfony Proxy, as tag handler does not clear tags between requests.
        $response->headers->set($this->tagHeader, $this->repoPrefix . 'ez-user-context-hash');
    }