? 534092-cache-returns-expired-objects-D6.patch
? 534092-cache-returns-expired-objects-rev2-D6.patch
Index: includes/cache.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/cache.inc,v
retrieving revision 1.17.2.2
diff -u -p -r1.17.2.2 cache.inc
--- includes/cache.inc	26 May 2009 08:10:33 -0000	1.17.2.2
+++ includes/cache.inc	30 Jul 2009 02:59:09 -0000
@@ -33,6 +33,10 @@ function cache_get($cid, $table = 'cache
         $cache->data = unserialize($cache->data);
       }
     }
+    // If the data has an expire time set, and we're past it, ignore it.
+    else if (CACHE_PERMANENT < $cache->expire && $cache->expire < time()){
+      return 0;
+    }
     // If enforcing a minimum cache lifetime, validate that the data is
     // currently valid for this user before we return it by making sure the
     // cache entry was created before the timestamp in the current session's
