Loading src/Plugin/Field/FieldFormatter/OfficeHoursFormatterBase.php +3 −3 Original line number Diff line number Diff line Loading @@ -415,11 +415,11 @@ abstract class OfficeHoursFormatterBase extends FormatterBase { $max_age = $items->getCacheTime($settings, $this->getFieldSettings()); if ($max_age !== Cache::PERMANENT) { // $cache_tags = $field_definition->getTargetEntityTypeId(); $cache_tags = $field_definition->id(); $entity = $items->getEntity(); $cache_tags = $entity->getEntityTypeId() . ':' . $entity->id(); $elements['#cache'] = [ 'max-age' => $items->getCacheTime($settings, $this->getFieldSettings()), // @todo Add per-entity tags 'thing:identifier'. // @see https://www.drupal.org/docs/drupal-apis/cache-api/cache-tags 'tags' => [$cache_tags], ]; Loading Loading
src/Plugin/Field/FieldFormatter/OfficeHoursFormatterBase.php +3 −3 Original line number Diff line number Diff line Loading @@ -415,11 +415,11 @@ abstract class OfficeHoursFormatterBase extends FormatterBase { $max_age = $items->getCacheTime($settings, $this->getFieldSettings()); if ($max_age !== Cache::PERMANENT) { // $cache_tags = $field_definition->getTargetEntityTypeId(); $cache_tags = $field_definition->id(); $entity = $items->getEntity(); $cache_tags = $entity->getEntityTypeId() . ':' . $entity->id(); $elements['#cache'] = [ 'max-age' => $items->getCacheTime($settings, $this->getFieldSettings()), // @todo Add per-entity tags 'thing:identifier'. // @see https://www.drupal.org/docs/drupal-apis/cache-api/cache-tags 'tags' => [$cache_tags], ]; Loading