1 views.module views_invalidate_cache()

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

File

core/modules/views/views.module, line 825
Primarily Backdrop hooks and global API functions to manipulate views.

Code

function views_invalidate_cache() {
  // Clear static caches.
  backdrop_static_reset('views_get_all_views');
  backdrop_static_reset('views_get_view');

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

  // Clear the page and block cache.
  cache_clear_all();

  // 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');
}