function DrupalDatabaseCache::isEmpty in Drupal 7
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 - Functions and interfaces for cache handling.
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);
}