public function exists($key)
    {

        $path = $this->getKeyPath($key);

        if (!file_exists($path) || empty($this->_lifeTimes[$key]))
            return false;

        if (time() - filemtime($path) > $this->_lifeTimes[$key])
            return false;

        return true;
    }
public function exists($key)
    {

        $path = $this->getKeyPath($key);

        if (!file_exists($path) || empty($this->_lifeTimes[$key]))
            return false;

        if (time() - filemtime($path) > $this->_lifeTimes[$key])
            return false;

        return true;
    }
public function exists ( $ key ) { $ path = $ this -> getKeyPath ( $ key ) ; if ( ! file_exists ( $ path ) || empty ( $ this -> _lifeTimes [ $ key ] ) ) return false ; if ( time ( ) - filemtime ( $ path ) > $ this -> _lifeTimes [ $ key ] ) return false ; return true ; }
Checks if the given cache key has an existing cache file that didn't exceed the given life-time

@param $key string The key that needs to be checked

@return bool
Checks if the given cache key has an existing cache file that didn t exceed the given life - time