original_string: 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;
      }
code: 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;
      }
code_tokens: 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 ; }
docstring: Returns true if cache with given key exists, otherwise false
  If the cache has lived for longer than its life time, destroy the cache
docstring_tokens: Returns true if cache with given key exists otherwise false If the cache has lived for longer than its life time destroy the cache