function hook_views_invalidate_cache

Allow modules to respond to the Views cache being invalidated.

This hook should fire whenever a view is enabled, disabled, created, updated, or deleted.

Parameters

string $cid: The cache identifier that is being cleared.

See also

views_invalidate_cache()

Related topics

1 function implements hook_views_invalidate_cache()

Note: the procedural functions in this list are found by pattern matching, so the list may include some functions that are not actually implementations of this hook.

ViewsTestDataViewsHooks::viewsInvalidateCache in core/modules/views/tests/modules/views_test_data/src/Hook/ViewsTestDataViewsHooks.php
Implements hook_views_invalidate_cache().
1 invocation of hook_views_invalidate_cache()
views_invalidate_cache in ./views.module
Invalidate the views cache, forcing a rebuild on the next grab of table data.

File

./views.api.php, line 1312

Code

function hook_views_invalidate_cache($cid) {
    cache_clear_all('views:*', 'cache_mymodule', TRUE);
}