From c7a563c63aca62c1999b0bf6e1ef6e60c93d6b40 Mon Sep 17 00:00:00 2001 From: catch <catch@35733.no-reply.drupal.org> Date: Mon, 29 Jun 2020 22:33:14 +0100 Subject: [PATCH] Issue #3144046 by Matroskeen: Incorrect example of adding Cache metadata in hook_menu_local_tasks_alter() (cherry picked from commit 78cc0f2804461033415970865404ab53cd0af689) --- core/lib/Drupal/Core/Menu/menu.api.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/lib/Drupal/Core/Menu/menu.api.php b/core/lib/Drupal/Core/Menu/menu.api.php index 758013f494e0..dfe000971d2b 100644 --- a/core/lib/Drupal/Core/Menu/menu.api.php +++ b/core/lib/Drupal/Core/Menu/menu.api.php @@ -329,7 +329,7 @@ function hook_menu_local_tasks_alter(&$data, $route_name, \Drupal\Core\Cache\Ref ], ]; // The tab we're adding is dependent on a user's access to add content. - $cacheability->addCacheTags(['user.permissions']); + $cacheability->addCacheContexts(['user.permissions']); } /** -- GitLab