core/modules/field/lib/Drupal/field/Entity/FieldConfig.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/core/modules/field/lib/Drupal/field/Entity/FieldConfig.php b/core/modules/field/lib/Drupal/field/Entity/FieldConfig.php index 8bbf224..81d488c 100644 --- a/core/modules/field/lib/Drupal/field/Entity/FieldConfig.php +++ b/core/modules/field/lib/Drupal/field/Entity/FieldConfig.php @@ -367,11 +367,13 @@ public function postSave(EntityStorageControllerInterface $storage_controller, $ // Clear the cache. field_cache_clear(); - // Invalidate the render cache for all affected entities. - $entity_manager = \Drupal::entityManager(); - $entity_type = $this->getTargetEntityTypeId(); - if ($entity_manager->hasController($entity_type, 'view_builder')) { - $entity_manager->getViewBuilder($entity_type)->resetCache(); + if ($update) { + // Invalidate the render cache for all affected entities. + $entity_manager = \Drupal::entityManager(); + $entity_type = $this->getTargetEntityTypeId(); + if ($entity_manager->hasController($entity_type, 'view_builder')) { + $entity_manager->getViewBuilder($entity_type)->resetCache(); + } } }