Browse Source

Disable cache for status messages.

8.x-1.x
Chi 8 years ago
parent
commit
ae6ce7ae28
  1. 2
      src/TwigExtension.php

2
src/TwigExtension.php

@ -351,6 +351,8 @@ class TwigExtension extends \Twig_Extension {
*/ */
public function drupalSetMessage($message = NULL, $type = 'status', $repeat = FALSE) { public function drupalSetMessage($message = NULL, $type = 'status', $repeat = FALSE) {
drupal_set_message($message, $type, $repeat); drupal_set_message($message, $type, $repeat);
$build['#cache']['max-age'] = 0;
return $build;
} }
} }

Loading…
Cancel
Save