original_string: public function reset_caches($tablenames = null) {
          if (!empty($tablenames)) {
              $dbmetapurged = false;
              foreach ($tablenames as $tablename) {
                  if ($this->temptables->is_temptable($tablename)) {
                      $this->get_temp_tables_cache()->delete($tablename);
                  } else if ($dbmetapurged === false) {
                      $this->tables = null;
                      $this->get_metacache()->purge();
                      $this->metacache = null;
                      $dbmetapurged = true;
                  }
              }
          } else {
              $this->get_temp_tables_cache()->purge();
              $this->tables = null;
              // Purge MUC as well.
              $this->get_metacache()->purge();
              $this->metacache = null;
          }
      }
code: public function reset_caches($tablenames = null) {
          if (!empty($tablenames)) {
              $dbmetapurged = false;
              foreach ($tablenames as $tablename) {
                  if ($this->temptables->is_temptable($tablename)) {
                      $this->get_temp_tables_cache()->delete($tablename);
                  } else if ($dbmetapurged === false) {
                      $this->tables = null;
                      $this->get_metacache()->purge();
                      $this->metacache = null;
                      $dbmetapurged = true;
                  }
              }
          } else {
              $this->get_temp_tables_cache()->purge();
              $this->tables = null;
              // Purge MUC as well.
              $this->get_metacache()->purge();
              $this->metacache = null;
          }
      }
code_tokens: public function reset_caches ( $ tablenames = null ) { if ( ! empty ( $ tablenames ) ) { $ dbmetapurged = false ; foreach ( $ tablenames as $ tablename ) { if ( $ this -> temptables -> is_temptable ( $ tablename ) ) { $ this -> get_temp_tables_cache ( ) -> delete ( $ tablename ) ; } else if ( $ dbmetapurged === false ) { $ this -> tables = null ; $ this -> get_metacache ( ) -> purge ( ) ; $ this -> metacache = null ; $ dbmetapurged = true ; } } } else { $ this -> get_temp_tables_cache ( ) -> purge ( ) ; $ this -> tables = null ; // Purge MUC as well. $ this -> get_metacache ( ) -> purge ( ) ; $ this -> metacache = null ; } }
docstring: Resets the internal column details cache
  
  @param array|null $tablenames an array of xmldb table names affected by this request.
  @return void
docstring_tokens: Resets the internal column details cache