Index: includes/cache.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/cache.inc,v
retrieving revision 1.28
diff -u -p -r1.28 cache.inc
--- includes/cache.inc	3 Feb 2009 12:30:14 -0000	1.28
+++ includes/cache.inc	5 Apr 2009 12:46:23 -0000
@@ -18,10 +18,10 @@ function cache_get($cid, $table = 'cache
   global $user;
 
   // Garbage collection necessary when enforcing a minimum cache lifetime
-  $cache_flush = variable_get('cache_flush', 0);
+  $cache_flush = variable_get('cache_flush_' . $table, 0);
   if ($cache_flush && ($cache_flush + variable_get('cache_lifetime', 0) <= REQUEST_TIME)) {
     // Reset the variable immediately to prevent a meltdown in heavy load situations.
-    variable_set('cache_flush', 0);
+    variable_set('cache_flush_' . $table, 0);
     // Time to flush old cache data
     db_delete($table)
       ->condition('expire', CACHE_PERMANENT, '<>')
@@ -165,10 +165,10 @@ function cache_clear_all($cid = NULL, $t
       // cached data that was cached before the timestamp.
       $user->cache = REQUEST_TIME;
 
-      $cache_flush = variable_get('cache_flush', 0);
+      $cache_flush = variable_get('cache_flush_' . $table, 0);
       if ($cache_flush == 0) {
         // This is the first request to clear the cache, start a timer.
-        variable_set('cache_flush', REQUEST_TIME);
+        variable_set('cache_flush_ . $table', REQUEST_TIME);
       }
       elseif (REQUEST_TIME > ($cache_flush + variable_get('cache_lifetime', 0))) {
         // Clear the cache for everyone, cache_flush_delay seconds have
@@ -177,7 +177,7 @@ function cache_clear_all($cid = NULL, $t
           ->condition('expire', CACHE_PERMANENT, '<>')
           ->condition('expire', REQUEST_TIME, '<')
           ->execute();
-        variable_set('cache_flush', 0);
+        variable_set('cache_flush_' $table, 0);
       }
     }
     else {
