Problem/Motivation

Drupal Core added the ENTITY_TYPE_list:BUNDLE cache tag per https://www.drupal.org/node/3107058. \Drupal\webform\Element\WebformTermReferenceTrait::setOptions currently outputs just the taxonomy_term_list cache tag. It can swap to outputting taxonomy_term_list:{{vocabulary_id}} to more selectively respond to cache invalidations when terms / vocabularies are updated.

Steps to reproduce

  1. Have a webform that uses the webform_term_select element with options from a taxonomy vocabulary
  2. Enable http.response.debug_cacheability_headers: true per https://www.drupal.org/node/2592471 to see X-Drupal-Cache-Tags debug values
  3. Hit the page, check X-Drupal-Cache-Tags values, it will contain just the taxonomy_term_list cache tag

Proposed resolution

Update \Drupal\webform\Element\WebformTermReferenceTrait::setOptions to set the more specific taxonomy_term_list:{{vocabulary_id}} cache tag.

Remaining tasks

User interface changes

API changes

Data model changes

Issue fork webform-3373407

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

angrytoast created an issue. See original summary.

jrockowitz made their first commit to this issue’s fork.

jrockowitz’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.