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.

CommentFileSizeAuthor
#3 cache_3.patch7.15 KBJeremy
bootstrap.inc_7.patch2.08 KBJeremy
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Jeremy’s picture

Status: Active » Needs review

Patch needs review.

chx’s picture

Jeremy, 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...

Jeremy’s picture

FileSize
7.15 KB

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

Dries’s picture

Status: Needs review » Fixed

Committed to HEAD. Thanks.

javaperl’s picture

Anonymous’s picture

Anonymous’s picture

Status: Fixed » Closed (fixed)