private function isCacheValid()
    {
        if (!$this->cacheFile->exists()) {
            return false;
        }

        $cachedConfigTimestamp = $this->cacheFile->getTimestamp();

        /** @var \Bolt\Filesystem\Filesystem $configFs */
        $configFs = $this->app['filesystem']->getFilesystem('config');

        $configFiles = [
            'config.yml',
            'config_local.yml',
            'contenttypes.yml',
            'extensions.yml',
            'menu.yml',
            'permissions.yml',
            'routing.yml',
            'taxonomy.yml',
        ];
        foreach ($configFiles as $configFile) {
            $timestamp = $configFs->has($configFile) ? $configFs->get($configFile)->getTimestamp() : 0;
            if ($timestamp > $cachedConfigTimestamp) {
                // The configuration file timestamp is *newer* than the cache file's … invalidate!
                $this->invalidateCache();

                return false;
            }
        }

        return true;
    }
private function isCacheValid()
    {
        if (!$this->cacheFile->exists()) {
            return false;
        }

        $cachedConfigTimestamp = $this->cacheFile->getTimestamp();

        /** @var \Bolt\Filesystem\Filesystem $configFs */
        $configFs = $this->app['filesystem']->getFilesystem('config');

        $configFiles = [
            'config.yml',
            'config_local.yml',
            'contenttypes.yml',
            'extensions.yml',
            'menu.yml',
            'permissions.yml',
            'routing.yml',
            'taxonomy.yml',
        ];
        foreach ($configFiles as $configFile) {
            $timestamp = $configFs->has($configFile) ? $configFs->get($configFile)->getTimestamp() : 0;
            if ($timestamp > $cachedConfigTimestamp) {
                // The configuration file timestamp is *newer* than the cache file's … invalidate!
                $this->invalidateCache();

                return false;
            }
        }

        return true;
    }
private function isCacheValid ( ) { if ( ! $ this -> cacheFile -> exists ( ) ) { return false ; } $ cachedConfigTimestamp = $ this -> cacheFile -> getTimestamp ( ) ; /** @var \Bolt\Filesystem\Filesystem $configFs */ $ configFs = $ this -> app [ 'filesystem' ] -> getFilesystem ( 'config' ) ; $ configFiles = [ 'config.yml' , 'config_local.yml' , 'contenttypes.yml' , 'extensions.yml' , 'menu.yml' , 'permissions.yml' , 'routing.yml' , 'taxonomy.yml' , ] ; foreach ( $ configFiles as $ configFile ) { $ timestamp = $ configFs -> has ( $ configFile ) ? $ configFs -> get ( $ configFile ) -> getTimestamp ( ) : 0 ; if ( $ timestamp > $ cachedConfigTimestamp ) { // The configuration file timestamp is *newer* than the cache file's … invalidate! $ this -> invalidateCache ( ) ; return false ; } } return true ; }
Check if the cached config file exists, and is newer than the authoritative source.

@return bool
Check if the cached config file exists and is newer than the authoritative source .