Loading src/Plugin/Field/FieldFormatter/OfficeHoursFormatterBase.php +3 −3 Original line number Diff line number Diff line Loading @@ -410,16 +410,16 @@ abstract class OfficeHoursFormatterBase extends FormatterBase { * The list of formatters. */ protected function addCacheMaxAge(OfficeHoursItemListInterface $items, array &$elements) { $field_definition = $items->getFieldDefinition(); $settings = $this->getSettings(); $third_party_settings = $this->getThirdPartySettings(); $max_age = $items->getCacheTime($settings, $this->getFieldSettings()); $max_age = $items->getCacheTime($settings, $this->getFieldSettings(), $third_party_settings); if ($max_age !== Cache::PERMANENT) { $entity = $items->getEntity(); $cache_tags = $entity->getEntityTypeId() . ':' . $entity->id(); $elements['#cache'] = [ 'max-age' => $items->getCacheTime($settings, $this->getFieldSettings()), 'max-age' => $max_age, // @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 @@ -410,16 +410,16 @@ abstract class OfficeHoursFormatterBase extends FormatterBase { * The list of formatters. */ protected function addCacheMaxAge(OfficeHoursItemListInterface $items, array &$elements) { $field_definition = $items->getFieldDefinition(); $settings = $this->getSettings(); $third_party_settings = $this->getThirdPartySettings(); $max_age = $items->getCacheTime($settings, $this->getFieldSettings()); $max_age = $items->getCacheTime($settings, $this->getFieldSettings(), $third_party_settings); if ($max_age !== Cache::PERMANENT) { $entity = $items->getEntity(); $cache_tags = $entity->getEntityTypeId() . ':' . $entity->id(); $elements['#cache'] = [ 'max-age' => $items->getCacheTime($settings, $this->getFieldSettings()), 'max-age' => $max_age, // @see https://www.drupal.org/docs/drupal-apis/cache-api/cache-tags 'tags' => [$cache_tags], ]; Loading