The "fuzzy cache" mechanism is supposed to enforce a minimum time before the cache table is flushed. Logical errors in the fuzzy cache implementation are leading to the cache table being flushed more frequently.
With this patch and the fuzzy cache enabled, when an event leads to cache_clear_all() being called:
- the cache is invalidated for the current user (simulating the cache being cleared for that user)
- a 5 minutes timer is started
Once five minutes passes, the cache is finally cleared for all users. Thus, with this patch the cache should never be cleared more than once every five minutes. Testing needs to be done to determine if 5 minutes is a long enough delay. Optionally, this delay time could be made configurable.
Comment | File | Size | Author |
---|---|---|---|
#3 | cache_3.patch | 7.15 KB | Jeremy |
bootstrap.inc_7.patch | 2.08 KB | Jeremy | |
Comments
Comment #1
Jeremy CreditAttribution: Jeremy commentedPatch needs review.
Comment #2
chx CreditAttribution: chx commentedJeremy, I love this patch. Can't wait for Dries to install and test on drupal.org -- alas I can't test as I do not have a site with enough visitors...
Comment #3
Jeremy CreditAttribution: Jeremy commentedBased on a brief conversation with Dries, here is an updated version of this patch.
Configuration is simplified by removing all references to "strict" and "loose" caches. Instead, the cache is either "disabled" or "enabled". Additionally, the site administrator can now configure the "minimum cache lifetime", the minimum amount of time cached data will remain cached.
The patch updates the system.module and bootstrap.inc.
Comment #4
Dries CreditAttribution: Dries commentedCommitted to HEAD. Thanks.
Comment #5
javaperl CreditAttribution: javaperl commentedComment #6
(not verified) CreditAttribution: commentedComment #7
(not verified) CreditAttribution: commented