protected function updateNodeResponse(Response $response, ReadNodeInterface $node, Request $request)
    {
        $tagManager = $this->get('open_orchestra_base.manager.tag');
        $cacheableManager = $this->get('open_orchestra_display.manager.cacheable');

        $cacheTags = array(
            $tagManager->formatNodeIdTag($node->getNodeId()),
            $tagManager->formatLanguageTag($node->getLanguage()),
            $tagManager->formatSiteIdTag($node->getSiteId())
        );
        $cacheableManager->addCacheTags($cacheTags);

        $cacheInfo = $this->get('open_orchestra_front.manager.node_response_manager')->getNodeCacheInfo($node);
        $privacy = ($cacheInfo[NodeResponseManager::IS_PUBLIC]) ? CacheableInterface::CACHE_PUBLIC : CacheableInterface::CACHE_PRIVATE;

        if ($this->has('esi') && $this->get('esi')->hasSurrogateCapability($request)) {
            $response = $cacheableManager->setResponseCacheParameters(
                $response,
                (CacheableInterface::CACHE_PUBLIC === $privacy) ? $node->getMaxAge() : 0,
                $privacy,
                true
            );
        } else {
            $response = $cacheableManager->setResponseCacheParameters(
                $response,
                (CacheableInterface::CACHE_PUBLIC === $privacy) ? $cacheInfo[NodeResponseManager::MAX_AGE] : 0,
                $privacy
            );
        }

        return $response;
    }