Skip to content

Commit

Permalink
Issue #3144046 by Matroskeen: Incorrect example of adding Cache metad…
Browse files Browse the repository at this point in the history
…ata in hook_menu_local_tasks_alter()

(cherry picked from commit 78cc0f2804461033415970865404ab53cd0af689)
  • Loading branch information
catch committed Jun 29, 2020
1 parent d29df8a commit b59edbc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Drupal/Core/Menu/menu.api.php
Original file line number Diff line number Diff line change
Expand Up @@ -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']);
}

/**
Expand Down

0 comments on commit b59edbc

Please sign in to comment.