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
- Have a webform that uses the
webform_term_select
element with options from a taxonomy vocabulary - Enable
http.response.debug_cacheability_headers: true
per https://www.drupal.org/node/2592471 to seeX-Drupal-Cache-Tags
debug values - Hit the page, check
X-Drupal-Cache-Tags
values, it will contain just thetaxonomy_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
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:
Comments
Comment #5
jrockowitz CreditAttribution: jrockowitz as a volunteer and at Webform module Open Collective, The Big Blue House commented