Problem/Motivation
Cache of entities are not invalidated when the entity label changes.
Steps to reproduce for nodes & breadcrumbs (from #3):
- Create a node with title 'Title A'.
- Change the title to 'Title B' and check the 'Create new revision'.
- Open the Revisions tab > Breadcrumb shows the right title (Title B).
- Change the title to 'Title C' and check the 'Create new revision'.
- Open the Revisions tab.
Expected: The title in the breadcrumb is 'Title C'.
Actual: the title in the breadcrumb is 'Title B'.
Steps to reproduce for users (from #48):
- Log in
- Edit your username and save.
- Return to the edit screen for your user account.
Expected: Breadcrumb shows your new username
Actual: You'll see your old username is still utilised in the breadcrumb.
Proposed resolution
Allow attaching cacheability metadata to titles with a new CacheableTitleResolverInterface that returns a static or dynamic title (with cacheable metadata).