public function needsReload($key)
    {
        $needsReload = true;

        if ($this->cache->exists($key)) {
            try {
                $dateCache = $this->cache->mtime($key);
                $needsReload = false;

                if (time() - $this->ttl >= $dateCache) {
                    $dateSource = $this->source->mtime($key);
                    $needsReload = $dateCache < $dateSource;
                }
            } catch (\RuntimeException $e) {
            }
        }

        return $needsReload;
    }
public function needsReload($key)
    {
        $needsReload = true;

        if ($this->cache->exists($key)) {
            try {
                $dateCache = $this->cache->mtime($key);
                $needsReload = false;

                if (time() - $this->ttl >= $dateCache) {
                    $dateSource = $this->source->mtime($key);
                    $needsReload = $dateCache < $dateSource;
                }
            } catch (\RuntimeException $e) {
            }
        }

        return $needsReload;
    }
public function needsReload ( $ key ) { $ needsReload = true ; if ( $ this -> cache -> exists ( $ key ) ) { try { $ dateCache = $ this -> cache -> mtime ( $ key ) ; $ needsReload = false ; if ( time ( ) - $ this -> ttl >= $ dateCache ) { $ dateSource = $ this -> source -> mtime ( $ key ) ; $ needsReload = $ dateCache < $ dateSource ; } } catch ( \ RuntimeException $ e ) { } } return $ needsReload ; }
Indicates whether the cache for the specified key needs to be reloaded.

@param string $key
Indicates whether the cache for the specified key needs to be reloaded .