private function checkCacheFileTtl($name)
    {
        // this method is called only if env->isAutoReload() == FALSE
        if (
            false !== ($cacheFile = $this->container->get('twig')->getCacheFilename($name))
            && \is_file($cacheFile)
            && \time() - \filemtime($cacheFile) >= $this->templates[$name]['ttl']
        ) {
            // remove expired cache file
            \unlink($cacheFile);
        }
    }