function views_invalidate_cache

Invalidate the views cache, forcing a rebuild on the next grab of table data.

5 calls to views_invalidate_cache()
ExposedFormTest::testRenameResetButton in drupal/core/modules/views/lib/Drupal/views/Tests/Plugin/ExposedFormTest.php
Tests, whether and how the reset button can be renamed.
SettingsTest::testEditUI in drupal/core/modules/views/lib/Drupal/views/Tests/UI/SettingsTest.php
Tests the settings for the edit ui.
ViewStorageController::postSave in drupal/core/modules/views/lib/Drupal/views/ViewStorageController.php
Overrides Drupal\config\ConfigStorageController::postSave().
views_menu in drupal/core/modules/views/views.module
Implement hook_menu().
views_ui_tools_clear_cache in drupal/core/modules/views/views_ui/admin.inc
Submit hook to clear the views cache.

File

drupal/core/modules/views/views.module, line 957
Primarily Drupal hooks and global API functions to manipulate views.

Code

function views_invalidate_cache() {

  // Clear the views cache.
  cache('views_info')
    ->deleteAll();

  // Clear the page and block cache.
  cache_delete_tags(array(
    'content' => TRUE,
  ));

  // Set the menu as needed to be rebuilt.
  state()
    ->set('menu_rebuild_needed', TRUE);

  // Allow modules to respond to the Views cache being cleared.
  module_invoke_all('views_invalidate_cache');
}