Loading core/lib/Drupal/Core/Cache/Context/UserRolesCacheContext.php +5 −1 Original line number Diff line number Diff line Loading @@ -38,7 +38,11 @@ public function getContext($role = NULL) { * {@inheritdoc} */ public function getCacheableMetadata($role = NULL) { // The list of roles for the anonymous user can never change. if ($this->user->isAuthenticated()) { return (new CacheableMetadata())->setCacheTags(['user:' . $this->user->id()]); } return new CacheableMetadata(); } } Loading
core/lib/Drupal/Core/Cache/Context/UserRolesCacheContext.php +5 −1 Original line number Diff line number Diff line Loading @@ -38,7 +38,11 @@ public function getContext($role = NULL) { * {@inheritdoc} */ public function getCacheableMetadata($role = NULL) { // The list of roles for the anonymous user can never change. if ($this->user->isAuthenticated()) { return (new CacheableMetadata())->setCacheTags(['user:' . $this->user->id()]); } return new CacheableMetadata(); } }