protected function getCacheTagsAndLifetime()
    {
        $lifetime = null;
        $tags = array();
        $entriesMetadata = $this->contentCacheFrontend->getAllMetadata();
        foreach ($entriesMetadata as $identifier => $metadata) {
            $entryTags = isset($metadata['tags']) ? $metadata['tags'] : array();
            $entryLifetime = isset($metadata['lifetime']) ? $metadata['lifetime'] : null;

            if ($entryLifetime !== null) {
                if ($lifetime === null) {
                    $lifetime = $entryLifetime;
                } else {
                    $lifetime = min($lifetime, $entryLifetime);
                }
            }
            $tags = array_unique(array_merge($tags, $entryTags));
        }
        return array($tags, $lifetime);
    }