You are here

public function KeyValueStoreExpirable::deleteAll in MongoDB 8.2

Deletes all items from the key/value store.

Overrides KeyValueStore::deleteAll

File

modules/mongodb_storage/src/KeyValueStoreExpirable.php, line 36

Class

KeyValueStoreExpirable
KeyValueStore provides a KeyValueStoreExpirable as a MongoDB collection.

Namespace

Drupal\mongodb_storage

Code

public function deleteAll() {
  $this->mongoDbCollection
    ->drop();
  $this
    ->ensureIndexes();
}