Add cache-aware methods to DsFieldInterface

Created on 12 May 2023, about 1 year ago
Updated 28 December 2023, 6 months 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

Needs review

Version

3.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.69.0 2024