Add cache-aware methods to DsFieldInterface

Created on 12 May 2023, over 2 years ago

As a frequent author of dynamic DS Field plugins, I find myself constantly having to worry about including the #cache index in my build arrays, so that my DS fields are cached properly.

It sure would be nice if I could implement methods like getCacheContexts, getCacheTags, and getCacheMaxAge, the same way \Drupal\Core\Block\BlockBase does via \Drupal\Core\Plugin\ContextAwarePluginTrait, so that I could clearly and explicitly define my cache settings, rather than having to include #cache in the render array.

✨ Feature request
Status

Active

Version

5.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States AaronBauman Philadelphia

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024