function MongoDbStore::delete
Overrides PersistingStoreInterface::delete
File
-
vendor/
symfony/ lock/ Store/ MongoDbStore.php, line 262
Class
- MongoDbStore
- MongoDbStore is a StoreInterface implementation using MongoDB as a storage engine. Support for MongoDB server >=2.2 due to use of TTL indexes.
Namespace
Symfony\Component\Lock\StoreCode
public function delete(Key $key) : void {
$write = new BulkWrite();
$write->delete([
'_id' => (string) $key,
'token' => $this->getUniqueToken($key),
], [
'limit' => 1,
]);
$this->getManager()
->executeBulkWrite($this->namespace, $write);
}