Problem/Motivation
The Cache ID that is generated when an entity is changed looks like "node:3" (when node ID 3 is edited).
Now this clears the caches for every cache which matches this wildcard: "node:3*", so also a cache for "node:30" is cleared.
Proposed resolution
Append ":" at the end of the cache id.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | 2362081-too-much-cache-clear.patch | 474 bytes | schnitzel |
Comments
Comment #1
schnitzel commentedComment #2
schnitzel commentedthis sets the cache to be cleared to "node:3:" and with the wildcard "node:3:*", so "node:30" won't be cleared anymore.
Comment #3
sebastien m. commentedI think you should do both things.
Remove cid without ":" but without wildcard and with ":" with wildcard.
Otherwise the short cid won't be never cleared.
Comment #4
schnitzel commentedluckily this is not necessary, as the CIDs generated are done via drupal_render_cid_parts() and this contains the current theme name all the time.
So a cache with only "node:30" should not happen.
Comment #6
kars-t commentedHi
just added the patch to the latest dev. I believe that it is relaible that the view mode is always added to the key and we can use the key as Schnitzel proposed.
Thanks! :)