private function isCacheUpToDate(&$path, $input = null)
    {
        if (!$input) {
            $compiler = $this->getRenderer()->getCompiler();
            $input = $compiler->resolve($path);
            $path = $this->getCachePath(
                ($this->getOption('keep_base_name') ? basename($path) : '').
                $this->hashPrint($input)
            );

            // If up_to_date_check never refresh the cache
            if (!$this->getOption('up_to_date_check')) {
                return true;
            }

            // If there is no cache file, create it
            if (!file_exists($path)) {
                return false;
            }

            // Else check the main input path and all imported paths in the template
            return !$this->hasExpiredImport($input, $path);
        }

        $path = $this->getCachePath($this->hashPrint($input));

        // Do not re-parse file if the same hash exists
        return file_exists($path);
    }
private function isCacheUpToDate(&$path, $input = null)
    {
        if (!$input) {
            $compiler = $this->getRenderer()->getCompiler();
            $input = $compiler->resolve($path);
            $path = $this->getCachePath(
                ($this->getOption('keep_base_name') ? basename($path) : '').
                $this->hashPrint($input)
            );

            // If up_to_date_check never refresh the cache
            if (!$this->getOption('up_to_date_check')) {
                return true;
            }

            // If there is no cache file, create it
            if (!file_exists($path)) {
                return false;
            }

            // Else check the main input path and all imported paths in the template
            return !$this->hasExpiredImport($input, $path);
        }

        $path = $this->getCachePath($this->hashPrint($input));

        // Do not re-parse file if the same hash exists
        return file_exists($path);
    }
private function isCacheUpToDate ( & $ path , $ input = null ) { if ( ! $ input ) { $ compiler = $ this -> getRenderer ( ) -> getCompiler ( ) ; $ input = $ compiler -> resolve ( $ path ) ; $ path = $ this -> getCachePath ( ( $ this -> getOption ( 'keep_base_name' ) ? basename ( $ path ) : '' ) . $ this -> hashPrint ( $ input ) ) ; // If up_to_date_check never refresh the cache if ( ! $ this -> getOption ( 'up_to_date_check' ) ) { return true ; } // If there is no cache file, create it if ( ! file_exists ( $ path ) ) { return false ; } // Else check the main input path and all imported paths in the template return ! $ this -> hasExpiredImport ( $ input , $ path ) ; } $ path = $ this -> getCachePath ( $ this -> hashPrint ( $ input ) ) ; // Do not re-parse file if the same hash exists return file_exists ( $ path ) ; }
Return true if the file or content is up to date in the cache folder,
false else.

@param &string $path  to be filled
@param string  $input file or pug code

@return bool
Return true if the file or content is up to date in the cache folder false else .