protected function shouldBuildCacheItem($key, $schemaName)
    {
        $cacheOutOfDate = false;
        if ($this->cache->getUseAutoCache()) {
            $lastModTime = $this->parser->getSchemaModificationTime($schemaName);
            $cacheCreationTime = $this->cache->getCacheCreationTime($key);
            $cacheOutOfDate = (!$lastModTime || ($lastModTime > $cacheCreationTime));
        }

        return ($cacheOutOfDate || !$this->cache->contains($key));
    }