public function exists( $key, $lifetime )
    {
        if ( !$this->cache_dir )
        {
            $this->initializeCacheDir();
        }

        if ( !file_exists($this->cache_dir . $key . ".html") )
        {
            return false;
        }

        $file_lifetime = time() - filectime( $this->cache_dir . $key . ".html" );

        if ( $file_lifetime > $lifetime )
        {
            $this->delete( $key );
            return false;
        }

        return true;
    }
public function exists( $key, $lifetime )
    {
        if ( !$this->cache_dir )
        {
            $this->initializeCacheDir();
        }

        if ( !file_exists($this->cache_dir . $key . ".html") )
        {
            return false;
        }

        $file_lifetime = time() - filectime( $this->cache_dir . $key . ".html" );

        if ( $file_lifetime > $lifetime )
        {
            $this->delete( $key );
            return false;
        }

        return true;
    }
public function exists ( $ key , $ lifetime ) { if ( ! $ this -> cache_dir ) { $ this -> initializeCacheDir ( ) ; } if ( ! file_exists ( $ this -> cache_dir . $ key . ".html" ) ) { return false ; } $ file_lifetime = time ( ) - filectime ( $ this -> cache_dir . $ key . ".html" ) ; if ( $ file_lifetime > $ lifetime ) { $ this -> delete ( $ key ) ; return false ; } return true ; }
Returns true if cache with given key exists, otherwise false
If the cache has lived for longer than its life time, destroy the cache
Returns true if cache with given key exists otherwise false If the cache has lived for longer than its life time destroy the cache