cache_clear_all() contains the following code:
if (!isset($cid) && !isset($table)) {
cache_clear_all(NULL, 'cache_page');
cache_clear_all(NULL, 'cache_block');
return;
}
Am I right in thinking that the block cache should be cleared before the page cache? So that if an anonymous user happens to hit a page in between the two calls, they don't end up putting the old blocks back into the page cache.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | cache-clear-order-195202-1.patch | 570 bytes | pwolanin |
Comments
Comment #1
pwolanin commentedsure - it seems it would guard against such a rare edge case to reverse the order. Trivial patch attached.
Comment #2
Crell commentedValid concern, trivially simple fix, applies cleanly.
Comment #3
gábor hojtsyThanks. I also added a small bit of comment, so this knowledge is preserved.
Comment #4
(not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.