diff --git a/core/modules/comment/src/Plugin/Field/FieldFormatter/AuthorNameFormatter.php b/core/modules/comment/src/Plugin/Field/FieldFormatter/AuthorNameFormatter.php index 0a2a0ca..8bb550e 100644 --- a/core/modules/comment/src/Plugin/Field/FieldFormatter/AuthorNameFormatter.php +++ b/core/modules/comment/src/Plugin/Field/FieldFormatter/AuthorNameFormatter.php @@ -42,6 +42,9 @@ public function viewElements(FieldItemListInterface $items) { $elements[$delta] = array( '#theme' => 'username', '#account' => $account, + '#cache' => array( + 'tags' => $account->getCacheTags() + $comment->getCacheTags(), + ), ); }