Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
As discussed in #2241377: [meta] Profile/rationalise cache tags, they add a lot of noise, but we don't have a single real use case for them in core. We have an API, not need to make default assumptions and cache tags that we don't use.
Proposed resolution
Remove them.
Remaining tasks
User interface changes
API changes
Comment | File | Size | Author |
---|---|---|---|
#1 | remove-block_plugin-cache-tags-2449069-1.patch | 6.38 KB | Berdir |
Comments
Comment #1
BerdirAnd here's a patch.
Comment #2
BerdirThe code comment alone kind of shows how little sense those cache tags make. How on earth do you "modify a plugin"? change the code? :)
Comment #3
Fabianx CreditAttribution: Fabianx commentedIt is probably so that you could e.g. configure different text for different instances via config or such?
As a block:[foo] is one instance of a block plugin, but the plugin could have something central to apply to all such ...
That said, _if_ a block plugin in contrib wants to do so, they can just add the getCacheTags() method and be done, no need to default for all of those. when its not used in core.
As that:
RTBC, if tests pass
Could use a beta eval, too.
Comment #4
Wim Leers+100 — see #2241377-34: [meta] Profile/rationalise cache tags.
Exactly!
Comment #5
alexpottRemoving stuff that we are not using and makes no sense reduces fragility because we have less to maintain and test. Committed 809854e and pushed to 8.0.x. Thanks!