? boost-1.patch
? boost-538418.patch
? boost-538460.patch
Index: boost.admin.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/boost/boost.admin.inc,v
retrieving revision 1.1.2.1.2.3.2.46
diff -u -p -r1.1.2.1.2.3.2.46 boost.admin.inc
--- boost.admin.inc	3 Aug 2009 06:10:51 -0000	1.1.2.1.2.3.2.46
+++ boost.admin.inc	3 Aug 2009 07:01:53 -0000
@@ -305,6 +305,12 @@ function boost_admin_boost_performace_pa
     '#default_value' => BOOST_MULTISITE_SINGLE_DB,
     '#description'   => t('If Drupal is running on a multi-site with a single/shared database, then enabling this will allow for correct multi-site caching.'),
   );
+  $form['advanced']['boost_crawl_on_cron'] = array(
+    '#type'          => 'checkbox',
+    '#title'         => t('Preemptive Cache: Crawl URL\'s with the boost block setting to yes'),
+    '#default_value' => BOOST_CRAWL_ON_CRON,
+    '#description'   => t('Touch some select URL\'s so they are cached before anyone accesses them.'),
+  );
   $form['advanced']['boost_permissions_file'] = array(
     '#type'          => 'textfield',
     '#title'         => t('Files: Enter in a 4 digit number (octal) that will be used by !link. Example 0664', array('!link' => l(t('chmod()'), 'http://php.net/chmod'))),
Index: boost.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/boost/boost.module,v
retrieving revision 1.3.2.2.2.5.2.87
diff -u -p -r1.3.2.2.2.5.2.87 boost.module
--- boost.module	3 Aug 2009 06:53:30 -0000	1.3.2.2.2.5.2.87
+++ boost.module	3 Aug 2009 07:01:54 -0000
@@ -47,6 +47,7 @@ define('BOOST_OVERWRITE_FILE',       var
 define('BOOST_DISABLE_CLEAN_URL',    variable_get('boost_disable_clean_url', FALSE));
 define('BOOST_VERBOSE',              variable_get('boost_verbose', 5));
 define('BOOST_FLUSH_NODE_TERMS',     variable_get('boost_flush_node_terms', TRUE));
+define('BOOST_CRAWL_ON_CRON',        variable_get('boost_crawl_on_cron', FALSE));
 
 // This cookie is set for all authenticated users, so that they can be
 // excluded from caching (or in the future get a user-specific cached page):
@@ -200,6 +201,12 @@ function boost_menu() {
     'file path' => drupal_get_path('module', 'boost'),
     'file' => 'stats/boost_stats.ajax.inc',
   );
+  $items['boost_crawler'] = array(
+    'page callback' => 'boost_crawler',
+    'type' => MENU_CALLBACK,
+    'access callback' => 1,
+    'file path' => drupal_get_path('module', 'boost'),
+  );
   return $items;
 }
 
@@ -275,6 +282,11 @@ function boost_cron() {
     $block = module_invoke('statistics', 'block', 'view', 0);
     variable_set('boost_statistics_html', $block['content']);
   }
+
+  // Crawl Site
+  if (BOOST_CRAWL_ON_CRON) {
+    boost_crawler();
+  }
 }
 
 /*
@@ -544,7 +556,7 @@ function boost_block_db_settings_form() 
     '#description' => t('Default: %default', array('%default' => format_interval(BOOST_CACHE_LIFETIME))),
   );
   $form['boost_db_settings']['push'] = array(
-    '#type' => 'hidden',
+    '#type' => 'select',
     '#title' => t('Preemptive Cache'),
     '#default_value' => $info['push'],
     '#options' => array(
@@ -1917,3 +1929,12 @@ if (!function_exists('file_put_contents'
     return FALSE;
   }
 }
+
+//////////////////////////////////////////////////////////////////////////////
+// Crawler Code
+function boost_crawler() {
+  $results = db_query_range('SELECT url FROM {boost_cache} WHERE push = 1 AND expire = 0', 0, 5);
+  while ($url = db_fetch_array($results)) {
+    drupal_http_request($url['url']);
+  }
+}
\ No newline at end of file
