? boost-601334.1.patch
? boost-601334.patch
Index: boost.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/boost/boost.module,v
retrieving revision 1.3.2.2.2.5.2.178
diff -u -p -r1.3.2.2.2.5.2.178 boost.module
--- boost.module	10 Oct 2009 21:04:55 -0000	1.3.2.2.2.5.2.178
+++ boost.module	11 Oct 2009 08:01:19 -0000
@@ -359,7 +359,7 @@ function boost_cron() {
 
   $expire = TRUE;
   if (BOOST_CHECK_BEFORE_CRON_EXPIRE) {
-    $expire = boost_has_site_changed();
+    $expire = boost_has_site_changed(TRUE);
   }
   // Expire old content
   if (!BOOST_LOOPBACK_BYPASS && variable_get('boost_expire_cron', TRUE) && $expire && boost_cache_db_expire()) {
@@ -1861,14 +1861,17 @@ function boost_get_db_term($term) {
 /**
  * Checks various timestamps in the database.
  *
+ * @param $set_max
+ *  bool Allow one to read and not set the max_timestamp.
+ *
  * @return bool
  *  Returns TRUE if the site has changed since the last time this function was called.
  */
-function boost_has_site_changed() {
+function boost_has_site_changed($set_max = FALSE) {
 
   // Get timestamps from the database
   $node_revisions = boost_get_time('node_revisions', 'timestamp');
-  $history = boost_get_time('history', 'timestamp');
+  //$history = boost_get_time('history', 'timestamp');
   $files = boost_get_time('files', 'timestamp');
   $comments = boost_get_time('comments', 'timestamp');
   $node = boost_get_time('node', 'changed');
@@ -1877,7 +1880,9 @@ function boost_has_site_changed() {
 
   $max = max($node_revisions, $history, $files, $comments, $node, $last_comment_timestamp, $voteapi_vote);
   if ($max != BOOST_MAX_TIMESTAMP) {
-    variable_set('boost_max_timestamp', (int)$max);
+    if ($set_max) {
+      variable_set('boost_max_timestamp', (int)$max);
+    }
     return TRUE;
   }
   else {
