function views_invalidate_cache
3.x views.module | views_invalidate_cache() |
2.x views.module | views_invalidate_cache() |
Invalidate the views cache, forcing a rebuild on the next grab of table data.
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. If the view does not already exist, A vid will be assigned to the view and also returned from this function.
- 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.
1 string reference to 'views_invalidate_cache'
- views_drush_cache_clear in drush/
views.drush.inc - Adds a cache clear option for views.
File
- ./
views.module, line 920 - Primarily Drupal hooks and global API functions to manipulate views.
Code
function views_invalidate_cache() {
// Clear the views cache.
cache_clear_all('*', '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');
}