In the d8cache_do_invalidate_cache_tags function, the $tags variable gets passed in as tags to be cleared keyed by a boolean TRUE.
Further down, it appears as though the code assume the opposite is true, where the values in the array are expected to be the cache tags to be cleared. This causes issues as the call to array_unique clears away all the tags to be cleared except the first since it's only allowing filtering all but one TRUE value.
It looks like if we grab the keys of the array and pass that along to array_unique and sort, we'll get the expected behavior where the tag names are being cleared instead of a single array(0 => TRUE).
Patch to follow.
Comment | File | Size | Author |
---|---|---|---|
#4 | d8cache-cache-tags-not-invalidating-3027001-3.patch | 608 bytes | kengilb |
#3 | d8cache-cache-tags-not-invalidating-3027001-2.patch | 614 bytes | kengilb |
#2 | d8cache-cache-tags-not-invalidating-3027001-1.patch | 448 bytes | kengilb |
Comments
Comment #2
kengilb CreditAttribution: kengilb commentedComment #3
kengilb CreditAttribution: kengilb commentedNew patch to move convert the array in place that makes more sense.
Comment #4
kengilb CreditAttribution: kengilb commentedOne more patch omitting the unnecessary search value.
Comment #5
kengilb CreditAttribution: kengilb at Pac-12 Networks commentedComment #7
bdragon CreditAttribution: bdragon at Tag1 Consulting for Pac-12 Networks commentedCommitted, thanks.