Commit 96826f6c authored by bojanz's avatar bojanz Committed by tim.plunkett
Browse files

Issue #1605140 by bojanz: Remove usage of cache_clear_all().

parent ce159b9f
...@@ -721,7 +721,7 @@ function views_ui_add_form_save_submit($form, &$form_state) { ...@@ -721,7 +721,7 @@ function views_ui_add_form_save_submit($form, &$form_state) {
$view->save(); $view->save();
menu_router_rebuild(); menu_router_rebuild();
cache('cache_views')->flush(); cache('cache_views')->flush();
cache_clear_all(); cache_invalidate(array('content' => TRUE));
$form_state['redirect'] = 'admin/structure/views'; $form_state['redirect'] = 'admin/structure/views';
if (!empty($view->display['page'])) { if (!empty($view->display['page'])) {
$display = $view->display['page']; $display = $view->display['page'];
...@@ -2169,7 +2169,7 @@ function views_ui_edit_view_form_submit($form, &$form_state) { ...@@ -2169,7 +2169,7 @@ function views_ui_edit_view_form_submit($form, &$form_state) {
cache('cache_views')->flush(); cache('cache_views')->flush();
// Clear the page cache. // Clear the page cache.
cache_clear_all(); cache_invalidate(array('content' => TRUE));
// Remove this view from cache so we can edit it properly. // Remove this view from cache so we can edit it properly.
ctools_object_cache_clear('view', $form_state['view']->name); ctools_object_cache_clear('view', $form_state['view']->name);
......
...@@ -1810,7 +1810,8 @@ function save() { ...@@ -1810,7 +1810,8 @@ function save() {
$this->save_locale_strings(); $this->save_locale_strings();
cache('cache_views')->delete('views_urls'); cache('cache_views')->delete('views_urls');
cache_clear_all(); // clear the page cache as well. // Clear the page cache as well.
cache_invalidate(array('content' => TRUE));
} }
/** /**
...@@ -1847,8 +1848,10 @@ function delete($clear = TRUE) { ...@@ -1847,8 +1848,10 @@ function delete($clear = TRUE) {
cache('cache_views')->delete('views_query:' . $this->name); cache('cache_views')->delete('views_query:' . $this->name);
if ($clear) { if ($clear) {
cache_clear_all(); // this clears the block and page caches only. // Clear the block and page caches.
menu_router_rebuild(); // force a menu rebuild when a view is deleted. cache_invalidate(array('content' => TRUE));
// Force a menu rebuild when a view is deleted.
menu_router_rebuild();
} }
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment