Closed (outdated)
Project:
Drupal core
Version:
main
Component:
cache system
Priority:
Major
Category:
Task
Assigned:
Unassigned
Reporter:
Anonymous (not verified)
Created:
25 Apr 2014 at 14:17 UTC
Updated:
3 Jun 2026 at 16:29 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
catchThis might want to wait on #918538: Decouple cache tags from cache bins although it's not a hard blocker.
I'm thinking a method like resetCacheTags() and we call that on all backends as part of drupal_flush_all_caches().
Comment #2
berdirHere's a patch.
We already have a reset() that only resets static cache tags. Calling the new method in tests all the time would be a bit ugly, because we don't want to invalidate stored cache tags, just the static cache there. A better name would have made sense for that, Berdir--.
Comment #3
berdirComment #4
wim leersSounds like a good plan at first sight :)
Not actually true yet, unless you're referring to the invocation in
drupal_flush_all_caches().Comment #5
berdirWell, how else would you write it?
It *has* to be called after doing that, everything else would mess up the caches. It's only safe to call it after (or maybe even better, before). It's instructions for whoever wants to call it (which will likely never be anyone else except dfac()).
Comment #6
catchComment #7
imiksuI'll try to write tests for this.
Comment #8
imiksuComment #14
fgmA tiny problem with this is that it breaks alternate cache implementations like the current version of Redis in RedisCacheTagsChecksum, because they don't implement that new method on CacheTagsChecksumInterface.
Comment #15
berdirAbsolutely, the patch that I wrote is from february 2105, before 8.0.0.
To do this now, we need to do it in a new, optional interface (with the option to merge/require it with 9.0)
Comment #25
smustgrave commentedThank you for creating this issue to improve Drupal.
We are working to decide if this task is still relevant to a currently supported version of Drupal. There hasn't been any discussion here for over 8 years which suggests that this has either been implemented or is no longer relevant. Your thoughts on this will allow a decision to be made.
Since we need more information to move forward with this issue, the status is now Postponed (maintainer needs more info). If we don't receive additional information to help with the issue, it may be closed after three months.
Thanks!
Comment #26
catchI think this got fixed by #3097393: Cache tags grow endlessly