Show/hide menu link based on changing custom $tempStore value
You can try to add the custom cache tag to the access result:

return AccessResult::allowed()-&gt;addCacheTags(['custom_cache_tag']);
return AccessResult::forbidden()-&gt;addCacheTags(['custom_cache_tag']);