original_string: public function cleanup($expire) {
          if ($dir = opendir($this->dir)) {
              while (false !== ($file = readdir($dir))) {
                  if(!is_dir($file) && $file != '.' && $file != '..') {
                      $lasttime = @filemtime($this->dir.$file);
                      if (time() - $lasttime > $expire) {
                          @unlink($this->dir.$file);
                      }
                  }
              }
              closedir($dir);
          }
      }
code: public function cleanup($expire) {
          if ($dir = opendir($this->dir)) {
              while (false !== ($file = readdir($dir))) {
                  if(!is_dir($file) && $file != '.' && $file != '..') {
                      $lasttime = @filemtime($this->dir.$file);
                      if (time() - $lasttime > $expire) {
                          @unlink($this->dir.$file);
                      }
                  }
              }
              closedir($dir);
          }
      }
code_tokens: public function cleanup ( $ expire ) { if ( $ dir = opendir ( $ this -> dir ) ) { while ( false !== ( $ file = readdir ( $ dir ) ) ) { if ( ! is_dir ( $ file ) && $ file != '.' && $ file != '..' ) { $ lasttime = @ filemtime ( $ this -> dir . $ file ) ; if ( time ( ) - $ lasttime > $ expire ) { @ unlink ( $ this -> dir . $ file ) ; } } } closedir ( $ dir ) ; } }
docstring: Remove cache files
  
  @param int $expire The number of seconds before expiry
docstring_tokens: Remove cache files