src/Cache.php
public function isExpired()
    {
        if (!FS::isFile($this->_resultFile)) {
            return true;
        }

        $fileAge = abs(time() - filemtime($this->_resultFile));
        if ($fileAge >= $this->_cache_ttl) {
            return true;
        }

        $firstLine = trim(FS::firstLine($this->_resultFile));
        $expected  = trim($this->_getHeader());
        if ($expected === $firstLine) {
            return false;
        }

        return true;
    }
public function isExpired()
    {
        if (!FS::isFile($this->_resultFile)) {
            return true;
        }

        $fileAge = abs(time() - filemtime($this->_resultFile));
        if ($fileAge >= $this->_cache_ttl) {
            return true;
        }

        $firstLine = trim(FS::firstLine($this->_resultFile));
        $expected  = trim($this->_getHeader());
        if ($expected === $firstLine) {
            return false;
        }

        return true;
    }
public function isExpired ( ) { if ( ! FS :: isFile ( $ this -> _resultFile ) ) { return true ; } $ fileAge = abs ( time ( ) - filemtime ( $ this -> _resultFile ) ) ; if ( $ fileAge >= $ this -> _cache_ttl ) { return true ; } $ firstLine = trim ( FS :: firstLine ( $ this -> _resultFile ) ) ; $ expected = trim ( $ this -> _getHeader ( ) ) ; if ( $ expected === $ firstLine ) { return false ; } return true ; }
Check is current cache is expired
Check is current cache is expired