So I read that cache contexts and cache tags bubble up to the entire page they're in. Let's say I have a custom page template with 3 sections that are populated in the page's theme preprocess hook:
[A: The Current Time]
[B: The Logged in User Name / A link to login if not logged in]
[C: Node and Taxonomy data]
A and B are very simple and C is very complex and slow. The node/taxonomy data only changes when new content is added, so it also happens to update the least often and the one we'd want to cache the most. B is different between anonymous users and logged in users, and also unique to every user. A is the same for everyone but changes every minute.
Normally, I would have A with a max-age of 60 seconds, B with a 'user' context, and C with the node:id cache tags relevant to what it needs to show (which we invalidate when new content that affects those nodes is added).
It seems to me that including A and B severely limit the ability to cache C, because if the contexts bubble up then B will force the server to keep a cached copy of the page for every different user. And if the lowest max age bubbles up (not sure if this is a thing) then A will force the entire page to be invalidated every minute.
Does that mean that this specific scenario would force Drupal to clear the cache for C every minute? Does it depend on how the page is implemented?