function AdvancedSettingsForm::cacheSubmit

Same name in other branches
  1. 8.9.x core/modules/views_ui/src/Form/AdvancedSettingsForm.php \Drupal\views_ui\Form\AdvancedSettingsForm::cacheSubmit()
  2. 10 core/modules/views_ui/src/Form/AdvancedSettingsForm.php \Drupal\views_ui\Form\AdvancedSettingsForm::cacheSubmit()
  3. 11.x core/modules/views_ui/src/Form/AdvancedSettingsForm.php \Drupal\views_ui\Form\AdvancedSettingsForm::cacheSubmit()

Submission handler to clear the Views cache.

File

core/modules/views_ui/src/Form/AdvancedSettingsForm.php, line 104

Class

AdvancedSettingsForm
Form builder for the advanced admin settings page.

Namespace

Drupal\views_ui\Form

Code

public function cacheSubmit() {
    views_invalidate_cache();
    $this->messenger()
        ->addStatus($this->t('The cache has been cleared.'));
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.