function openlayers_views_views_invalidate_cache in Openlayers 7.3
Implements hook_views_invalidate_cache().
File
- modules/
openlayers_views/ openlayers_views.module, line 65 - Openlayers views integration.
Code
function openlayers_views_views_invalidate_cache() {
// If this hook is fired we've to assume that a openlayers related view was
// adjusted and thus we need to flush the openlayers plugin cache. This seems
// the only way to get notified about CRUD events of views.
cache_clear_all('views_view', 'cache', TRUE);
cache_clear_all('ctools_export_index:openlayers_maps', 'cache', TRUE);
cache_clear_all('ctools_export_index:openlayers_sources', 'cache', TRUE);
cache_clear_all('ctools_export_index:openlayers_layers', 'cache', TRUE);
cache_clear_all('ctools_export:openlayers_maps:*', 'cache', TRUE);
cache_clear_all('ctools_export:openlayers_sources:*', 'cache', TRUE);
cache_clear_all('ctools_export:openlayers_layers:*', 'cache', TRUE);
}