Bolt\Config::isThemeCacheValid PHP Метод

isThemeCacheValid() приватный Метод

Check if the cache is still valid with theme file as well.
private isThemeCacheValid ( ) : boolean
Результат boolean
    private function isThemeCacheValid()
    {
        if (!$this->cacheFile->exists()) {
            return false;
        }
        $themeDir = $this->app['filesystem.themes']->getDir($this->get('general/theme'));
        // Check the timestamp for the theme's configuration file
        $timestampTheme = 0;
        $themeFile = $themeDir->getFile('theme.yml');
        if ($themeFile->exists()) {
            $timestampTheme = $themeFile->getTimestamp();
        } elseif (($themeFile = $themeDir->getFile('config.yml')) && $themeFile->exists()) {
            /** @deprecated Deprecated since 3.0, to be removed in 4.0. (config.yml was the old filename) */
            $timestampTheme = $themeFile->getTimestamp();
        }
        return $this->cacheFile->getTimestamp() > $timestampTheme;
    }