function d8cache_preprocess_menu_link in Drupal 8 Cache Backport 7
Implements hook_preprocess_menu_link().
File
- includes/
menu.inc, line 16 - Menu functions and hooks for the D8 caching system backport.
Code
function d8cache_preprocess_menu_link(&$variables) {
$link = $variables['element']['#original_link'];
// Unfortunately preprocess_menu_tree does not have the information we need,
// so we need to add the cache tag for each menu link in a menu separately.
drupal_add_cache_tags(_d8cache_menu_link_get_cache_tags($link));
}