I am working in drupal 6. I know that saving any node clears cache but is the same with views? I am experiencing this issue. I would like to know how to prevent it. Thank you.
If we inspect views_ui_edit_view_form() we can see the following
#submit handler being assigned:
$form['buttons']['save'] = array( '#type' => 'submit', '#value' => t('Save'), '#validate' => array('views_ui_edit_view_form_validate'), '#submit' => array('views_ui_edit_view_form_submit'), );
Drilling further down into views_ui_edit_view_form_submit() it becomes clear which caches are affected by saving a view:
// Make sure menu items get rebuilt as neces menu_rebuild(); // Clear the views cache. cache_clear_all('*', 'cache_views'); // Clear the page cache. cache_clear_all(); // Remove this view from cache so we can edit it properly. views_object_cache_clear('view', $form_state['view']->name);
In summary, these are the caches that get cleared when a view gets saved:
In addition, the menu rebuild triggers the following hooks: