You are here

function boost_crawler_verify in Boost 6

Reload any url's that did not get cached.

Parameters

$expire: Has the site changed, if so get expire column

1 call to boost_crawler_verify()
boost_crawler_run in ./boost.module
The brains of the crawler.

File

./boost.module, line 6309
Provides static file caching for Drupal text output. Pages, Feeds, ect...

Code

function boost_crawler_verify($expire) {
  if ($expire && BOOST_LOOPBACK_BYPASS) {
    $list = db_query("SELECT DISTINCT bcrawler.url, bcrawler.hash FROM {boost_cache} bcache INNER JOIN {boost_crawler} bcrawler ON (bcache.hash_url = bcrawler.hash) WHERE bcache.expire BETWEEN 0 AND %d", BOOST_TIME);
  }
  else {
    $list = db_query("SELECT DISTINCT bcrawler.url, bcrawler.hash FROM {boost_cache} bcache INNER JOIN {boost_crawler} bcrawler ON (bcache.hash_url = bcrawler.hash) WHERE bcache.expire = 0");
  }
  db_query('TRUNCATE {boost_crawler}');
  variable_set('boost_crawler_position', 0);
  $recrawl = FALSE;
  while ($url = db_fetch_array($list)) {
    db_query("INSERT INTO {boost_crawler} (url, hash) VALUES ('%s', '%s')", $url['url'], $url['hash']);
    $recrawl = TRUE;
  }
  return $recrawl;
}