function DrupalDatabaseCache::isEmpty
Implements DrupalCacheInterface::isEmpty().
Overrides DrupalCacheInterface::isEmpty
1 method overrides DrupalDatabaseCache::isEmpty()
- DrupalFakeCache::isEmpty in includes/
cache-install.inc - Overrides DrupalDatabaseCache::isEmpty().
File
-
includes/
cache.inc, line 560
Class
- DrupalDatabaseCache
- Defines a default cache implementation.
Code
function isEmpty() {
$this->garbageCollection();
$query = db_select($this->bin);
$query->addExpression('1');
$result = $query->range(0, 1)
->execute()
->fetchField();
return empty($result);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.