Check if composer travis lint cache is stale.

@return boolean
768070
protected static function hasStaleCacheFile()
    {
        $composerTravisLintCache = getcwd()
            . DIRECTORY_SEPARATOR
            . self::CTL_CACHE;

        $travisConfiguration = getcwd()
            . DIRECTORY_SEPARATOR
            . self::TRAVIS_CONFIGURATION;

        if (file_exists($composerTravisLintCache) && file_exists($travisConfiguration)) {
            $travisConfigurationContent = trim(file_get_contents($travisConfiguration));
            $composerTravisLintCacheContent = trim(file_get_contents($composerTravisLintCache));

            if (md5($travisConfigurationContent) === $composerTravisLintCacheContent) {
                return false;
            }
        }

        return true;
    }
854746
public function isKeepAlive()
	{
		$nKeepAlive = intval( $this->m_cUCProMain->getXTInstance()->getTValue( UCProConst::CKT_KP_ALIVE ) );
		return ( 1 === $nKeepAlive );
	}
75728
public function clean() {
		if ( ! $this->enabled ) {
			return false;
		}

		$ttl      = $this->ttl;
		$max_size = $this->max_size;

		// unlink expired files
		if ( $ttl > 0 ) {
			try {
				$expire = new \DateTime();
			} catch ( \Exception $e ) {
				\WP_CLI::error( $e->getMessage() );
			}
			$expire->modify( '-' . $ttl . ' seconds' );

			$finder = $this->get_finder()->date( 'until ' . $expire->format( 'Y-m-d H:i:s' ) );
			foreach ( $finder as $file ) {
				unlink( $file->getRealPath() );
			}
		}

		// unlink older files if max cache size is exceeded
		if ( $max_size > 0 ) {
			$files = array_reverse( iterator_to_array( $this->get_finder()->sortByAccessedTime()->getIterator() ) );
			$total = 0;

			foreach ( $files as $file ) {
				if ( ( $total + $file->getSize() ) <= $max_size ) {
					$total += $file->getSize();
				} else {
					unlink( $file->getRealPath() );
				}
			}
		}

		return true;
	}
684260
protected function isExpired()
    {
        if (! $this->filesystem->exists($this->cached)) {
            return true;
        }

        $lastModified = $this->filesystem->lastModified($this->file->getPath());

        return $lastModified >= $this->filesystem->lastModified($this->cached);
    }
234838
private function isKeep()
    {
        return isset($this->trace[$this->eachIndex]['class']) && $this->trace[$this->eachIndex]['class'] === $this->beanRealCallRealClassName;
    }
1304664
protected function isRefresh()
    {
        return $this->wei->isDebug()
            && $this->request->getServer('HTTP_PRAGMA') == 'no-cache'
            && strpos($this->request->getServer('HTTP_USER_AGENT'), 'wechatdevtools') === false;
    }
1339389
private function isCached()
    {
        $filters = false;

        if ($this->cacheSettings) {
            if ($this->cache) {
                $filters = $this->cache->getCache();
            }
        }

        return $filters;
    }
1063789
public function isCheckRequired()
    {
        if ($this->expired === false) {
            return false;
        }

        if ($this->cacheFile->exists()) {
            $expiryTimestamp = (int) $this->cacheFile->read();
        } else {
            $expiryTimestamp = 0;
        }
        $ts = Carbon::createFromTimestamp($expiryTimestamp + self::CHECK_INTERVAL);

        return $this->expired = $ts->isPast();
    }
1361127
public function getCache() 
    {

        // make sure filters are parsed again if cache expired
        if (file_exists($this->path) && (time()-filectime($this->path)) < 
            $this->config['expiration_time']) {
            $data = unserialize(file_get_contents($this->path));
              return $data;
        }

        return false;
    }
187302
protected function isCached()
    {
        $cacheTime = self::CACHE_TIME * 60;

        if (!is_file($this->pathCache)) {
            return false;
        }

        $cachedTime = filemtime($this->pathCache);
        $cacheAge = $this->time - $cachedTime;

        return $cacheAge < $cacheTime;
    }
784674
public function hasTooManyLoginAttempts()
    {
        return $this->cacheLimiter->tooManyAttempts(
            $this->getUniqueLoginKey(),
            $this->maxLoginAttempts(),
            $this->lockoutTime() / 60
        );
    }
81468
public function has(string $key): bool
    {
        $file = $this->cacheFile($key);

        if (is_file($file)) {
            $data = include $file;
            $expire = (int)$data['ttl'];
            return $expire === 0 || time() < $expire;
        }

        return false;
    }
611857
protected function isCacheExpired($destiny)
    {
        $cacheModified = filemtime($destiny);

        if ($this->expiration !== null) {

            return $this->expiration > $cacheModified;
        }

        return filemtime($this->image) > $cacheModified;

    }
227556
function MustUseCache()
    {
        if ($this->cacheLifetime == 0)
        {
            return false;
        }
        if (!File::Exists($this->file))
        {
            return false;
        }
        $now = Date::Now();
        $lastMod = File::GetLastModified($this->file);
        if ($now->TimeStamp() - $lastMod->TimeStamp() < $this->cacheLifetime)
        {
            return true;
        }
        return false;
    }
229880
public function isExpired()
    {
        if (is_null($this->valid_until)) {
            return false;
        }

        return Carbon::now()->gt($this->valid_until) or Carbon::now()->eq($this->valid_until);
    }
238152
public function expired()
    {
        // Update if empty
        if (empty($this->entries)) {
            return true;
        }

        // Check timestamps
        if ($this->timestampManager) {
            return $this->timestampManager->check($this->getTimestamp());
        }

        return false;
    }
670815
def is_obsolete(self):
        
        if self.cache_updated:
            now = timezone.now()
            delta = now - self.cache_updated
            if delta.seconds < self.cache_validity:
                return False
        return True