If I have a node object I can use
$node->getCacheTags() to get the cache tags for the node object, and I can do the same for other entities. Is there a way for me to do something similar with a Route object?
$cache_tags = $route->getCacheTags();
or maybe there's a way for me to do something like this, where $entity is populated with the $user, or $node, or $view, etc. object that is responsible for the current route:
$entity = $route->getEntity(); $cache_tags = $entity->getCacheTags();