function views_invalidate_cache

Same name in other branches
  1. 6.x-3.x views.module \views_invalidate_cache()

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

Parameters

string $cid: The cache identifier we want to clear. If no given, it will default to '*' which will clear the entire cache_views bin.

7 calls to views_invalidate_cache()
view::delete in includes/view.inc
Delete the view from the database.
view::save in includes/view.inc
Save the view to the database.
ViewsExposedFormTest::testRenameResetButton in tests/views_exposed_form.test
Tests, whether and how the reset button can be renamed.
ViewsTranslatableTest::testUi in tests/views_translatable.test
views_export_status in ./views.module
Export callback to change view status.

... See full list

2 string references to 'views_invalidate_cache'
views_admin_menu_cache_info in ./views.module
Implements hook_admin_menu_cache_info().
views_drush_cache_clear in drush/views.drush.inc
Adds a cache clear option for views.

File

./views.module, line 1079

Code

function views_invalidate_cache($cid = '*') {
    // Clear the views cache.
    cache_clear_all($cid, 'cache_views', TRUE);
    // Clear the page and block cache.
    cache_clear_all();
    // Set the menu as needed to be rebuilt.
    variable_set('menu_rebuild_needed', TRUE);
    // Allow modules to respond to the Views cache being cleared.
    module_invoke_all('views_invalidate_cache', $cid);
}