Closed (works as designed)
Project:
Memcache API and Integration
Version:
6.x-1.x-dev
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
13 Jan 2010 at 05:10 UTC
Updated:
26 Aug 2010 at 22:29 UTC
Some modules (like authcache) use memcache during the fastpath routine. However if memcache is used before the variables are initialized during stage DRUPAL_BOOTSTRAP_LATE_PAGE_CACHE the cache will return stale content as it's unable to tell when it was last flush.
// Determine when the current table was last flushed.
$cache_flush = variable_get("cache_flush_$table", 0);
A fix might be to use a separate cache to store the cache_flush times, another fix might be to use MAXINT instead of 0 for the default cache_flush time. This would mean that if it was ever invoked before the variables would read it would return no content, rather then old content.
Comments
Comment #1
mbutcher commentedGiven that the nature of the cache_flush_variable is such that it really should be stored in the database, I'd think that the onus of correcting for this problem would be on projects that implement fastpath.
For us, we worked around it by building some simple logic into the fastpath function to set the necessary $conf settings in a way that lets fastpath function optimally.
Comment #2
jeremy commentedI see this as being the responsibility of the other modules that change this behavior, not the memcache module.