protected function setResponseHeaders(BlockInterface $block, Response $response)
    {
        if ($block && $block->getReference()) {
            if ($this->getReferenceService($block)->isEsiEnabled($block->getReference())) {
                $this->getReferenceService($block)->setResponseHeaders($block->getReference(), $response);
            } else {
                $response->setLastModified($block->getReference()->getUpdatedAt());
                $response->setPublic();
            }
        }
    }