You are here

public static function DataTable::clearCaches in Data 7

Same name and namespace in other branches
  1. 6 includes/DataTable.inc \DataTable::clearCaches()

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

2 calls to DataTable::clearCaches()
DataTable::adopt in includes/DataTable.inc
Let Data manage a table that already exists in the database.
data_ui_adopt_form_submit in data_ui/data_ui.admin.inc
Submit handler for adopt table form.

File

includes/DataTable.inc, line 587
Contains class definition for DataTable.

Class

DataTable
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.

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