You are here

function boost_count_db in Boost 6

Counts the number of pages in the static cache.

1 call to boost_count_db()
boost_admin_boost_performance_page in ./boost.admin.inc
Form builder; Displays Boost's configuration page.

File

./boost.admin.inc, line 1526
All the code for the Boost module's administrative interface.

Code

function boost_count_db($all = 0) {
  if ($all == 0) {
    return db_result(db_query("SELECT COUNT(*) FROM {boost_cache} WHERE expire <> 0 and base_dir = '%s'", BOOST_FILE_PATH));
  }
  elseif ($all == 1) {
    return db_result(db_query("SELECT COUNT(*) FROM {boost_cache} WHERE expire BETWEEN 1 AND %d AND base_dir ='%s'", BOOST_TIME, BOOST_FILE_PATH));
  }
  elseif ($all == 2) {
    return db_result(db_query("SELECT COUNT(*) FROM {boost_cache}"));
  }
}