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.
Updated: Comment #0
Problem/Motivation
It should be possible to clear all the ckeditor_plugins:<langcode>
cache entries at once. That's currently impossible because prefix cache clears no longer exist in favor of cache tags, yet cache tags are not yet being set on the above cache entries.
Proposed resolution
Set cache tags :)
Remaining tasks
None.
User interface changes
None.
API changes
None.
Comment | File | Size | Author |
---|---|---|---|
#1 | ckeditor_plugins_cache_tags-2109769-1.patch | 1.07 KB | Wim Leers |
Comments
Comment #1
Wim LeersTrivial :)
Comment #2
Gábor HojtsyDiscussed this with @Wim Leers:
That makes sense. I don't think individual added cache tags need any test coverage, so this should be fine.
Comment #3
webchickCommitted and pushed to 8.x. Thanks!
Comment #4
BerdirUh, why?
There's an API to clear the cache, $plugin->clearCachedDefinitions(). Cache tags should only be used if this is supposed to be cleared together with other things.
It is by design that this doesn't use cache tags by default, as they are right now a considerable overhead (every tag adds another query)
Comment #5
Wim Leers#4: then why do
LocalActionManager
andFilterPluginManager
do the same? In fact, why is it part of thesetCacheBackend()
signature at all?I do see how
PluginManager::clearCachedDefinitions()
can be used to achieve the same though. I feel silly now :( :P. But at the same time, if it shouldn't be done, then why is it part of the API at all?And yes,
clearCachedDefinitions()
is more efficient because it doesn't need to add cache tags. I just always thought thatclearCachedDefinitions()
was a static cache, not a full-on cache, that's why I didn't think of looking at that.Comment #6
webchickOk, reverted for now, since it looks like this needs more discussion.
Comment #7
tim.plunkett#5, quoting #4 again:
FilterPluginManager absolutely needs this because filter.module used cache tags previously, see filter_formats()
LocalActionManager likely doesn't need it, we should open a separate issue to consider removing it.
I think this is won't fix.
Comment #8
Gábor HojtsyAll right, its rolled back already :)
Comment #9
Wim Leers"won't fix" indeed.
Sorry guys :(