How do I prevent a form from being cached for anonymous users?
To update:

In order to prevent a form from caching at all, you can include the following #cache key in your form:

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