? boost-623536.patch
? boost-623578.patch
Index: boost.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/boost/boost.module,v
retrieving revision 1.3.2.2.2.5.2.228
diff -u -p -r1.3.2.2.2.5.2.228 boost.module
--- boost.module	3 Nov 2009 06:40:08 -0000	1.3.2.2.2.5.2.228
+++ boost.module	5 Nov 2009 20:36:33 -0000
@@ -1605,15 +1605,24 @@ function boost_cache_expire_by_db($paths
   $sql = implode("' OR hash = '", array_unique($hashes));
   $result = db_query("SELECT * FROM {boost_cache} WHERE hash = '" . $sql . "'");
 
-  // Eliminate duplicates
+  // Eliminate duplicates with the key hash
   $data = array();
+  $counter = 0;
   while ($info = db_fetch_array($result)) {
-    $hash = BOOST_FILE_PATH . $info['page_callback'] . $info['page_type'] . $info['page_id'];
-    $data[$hash] = $info;
+    if ($info['page_id'] != '' && $info['page_type'] != '' && $info['page_callback'] != '') {
+      // Use boost_cache_expire_router() if we can get a 'lock' on this item in the database
+      $hash = BOOST_FILE_PATH . $info['page_callback'] . $info['page_type'] . $info['page_id'];
+      $data[$hash] = $info;
+    }
+    else {
+      // If we can't get a 'lock' just expire the file
+      $counter += boost_cache_kill($info['filename']);
+    }
   }
 
   // Expire all files that match up
-  return boost_cache_expire_router($data);
+  $counter += boost_cache_expire_router($data);
+  return $counter;
 }
 
 
@@ -1747,7 +1756,7 @@ function boost_cache_expire_router($rout
     }
   }
   if (BOOST_VERBOSE >= 9) {
-    watchdog('boost', 'Debug: boost_cache_expire_router() <br />Following files where flushed: <br />!list', array('!list' => implode('<br />', $list)));
+    watchdog('boost', 'Debug: boost_cache_expire_router() <br />Following files where flushed: <br />!list<br /><br />Input: <br /> !input', array('!list' => implode('<br />', $list), '!input' => boost_print_r($router_items, TRUE, TRUE)));
   }
   return $count;
 }
