Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
\Drupal\Core\Entity\EntityDisplayBase::postSave() resets the render cache for the entity type the Display is about.
This thus runs for both EntityViewDisplay and EntityFormDisplay objects.
This is fine for EntityViewDisplay objects, since they control how an entity gets rendered,
but there's no need for EntityFormDisplay to invalidate the "view" cache ?
Comment | File | Size | Author |
---|---|---|---|
#1 | 2384163-EntityFormDisplay_render_cache-1.patch | 2.03 KB | yched |
Comments
Comment #1
yched CreditAttribution: yched commentedPatch.
Comment #2
BerdirNice, makes sense. There's no bug other than too many caches being cleared, I don't think we need a test for that (A test would save a form display and then ensure that no cache is cleared, that is not very helpful/useful).
And the existing tests all still pass.
Comment #3
alexpottThis issue is a normal bug fix, and doesn't include any disruptive changes, so it is allowed per https://www.drupal.org/core/beta-changes. Committed ea13784 and pushed to 8.0.x. Thanks!