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;
    }