1.20.x cache_database.inc BackdropDatabaseCache::isEmpty()

Implements BackdropCacheInterface::isEmpty().

Overrides BackdropCacheInterface::isEmpty

File

drivers/cache_database/cache_database.inc, line 173

Class

BackdropDatabaseCache
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);
}