You are here

function boost_drush_cache_reset in Boost 6

Clears Boost's database and file cache.

1 string reference to 'boost_drush_cache_reset'
boost_drush_command in ./boost.drush.inc
Implementation of hook_drush_command().

File

./boost.drush.inc, line 77
Drush commands for Boost.

Code

function boost_drush_cache_reset() {
  $ignore = variable_get('boost_ignore_flush', 0);
  $GLOBALS['conf']['boost_ignore_flush'] = 0;
  if (boost_cache_clear_all()) {
    db_query("TRUNCATE {boost_cache}");
    db_query("TRUNCATE {boost_cache_relationships}");
    db_query("TRUNCATE {boost_crawler}");
    _boost_rmdir_rf(BOOST_ROOT_CACHE_DIR, TRUE, TRUE, TRUE);
    print drush_log(dt('Boost: Static page cache & 3 database tables cleared.'), 'ok');
  }
  else {
    print drush_log(dt('Boost: Static page cache & database tables NOT cleared'), 'error');
  }
  $GLOBALS['conf']['boost_ignore_flush'] = $ignore;
}