public function CacheBackendMongodb::isEmpty in MongoDB 8
Implements Drupal\Core\Cache\CacheBackendInterface::isEmpty().
Checks if a cache bin is empty. A cache bin is considered empty if it does not contain any valid data for any cache ID.
Return value
TRUE if the cache bin specified is empty.
File
- src/
CacheBackendMongodb.php, line 272 - Definition of Drupal\mongodb/CacheBackendMongodb.
Class
- CacheBackendMongodb
- Defines MongoDB cache implementation.
Namespace
Drupal\mongodbCode
public function isEmpty() {
$this
->garbageCollection();
$item = $this->collection
->findOne();
return empty($item);
}