Skip to main content
DrupalABC

Main navigation

  • Home
  • Search
  • Learn Drupal
  • Certifications
  • Drupal Code Finder
User account menu
  • Log in

Breadcrumb

  1. Home

How to disable form cache in Druapal 8

Form cache in Drupal 8 can be disabled in following ways.

$form_state->setCached(FALSE);

And 

$form['#cache'] = ['max-age' => 0];

 

Tags
Drupal8
Form
Cache
Disqus
DrupalABC

Footer

  • Buy me a coffee
  • Drupal.org profile
  • LinkedIn
Powered by Drupal

Drupal is a registered trademark of Dries Buytaert