You are here

public static function Table::clearCaches in Data 8

Clear relevant caches. Call after operations that create, delete or modify tables.

File

src/Table.php, line 579

Class

Table
Manages data access and manipulation for a single data table. Use data_create_table() or data_get_table() to instantiate an object from this class.

Namespace

Drupal\data

Code

public static function clearCaches() {

  // Clear the schema cache.
  drupal_get_schema(NULL, TRUE);

  // Have views read new views information about table.
  if (module_exists('views')) {
    views_invalidate_cache();
  }

  // data ui exposes path to a new default view.
  if (module_exists('data_ui')) {
    menu_rebuild();
  }
}