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.

CommentFileSizeAuthor
#1 2362081-too-much-cache-clear.patch474 bytesschnitzel

Comments

schnitzel’s picture

Status: Active » Needs review
StatusFileSize
new474 bytes
schnitzel’s picture

this sets the cache to be cleared to "node:3:" and with the wildcard "node:3:*", so "node:30" won't be cleared anymore.

sebastien m.’s picture

I 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.

schnitzel’s picture

luckily 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.

  • Kars-T committed d70dede on 7.x-1.x authored by Schnitzel
    Issue #2362081 by Schnitzel: Cache clear clears caches for other entity...
kars-t’s picture

Status: Needs review » Fixed

Hi

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! :)

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.