You are here

public function CacheBackendMongodb::delete in MongoDB 8

Implements Drupal\Core\Cache\CacheBackendInterface::delete().

Deletes an item from the cache.

Parameters

string $cid: The cache ID to delete.

Overrides CacheBackendInterface::delete

File

src/CacheBackendMongodb.php, line 215
Definition of Drupal\mongodb/CacheBackendMongodb.

Class

CacheBackendMongodb
Defines MongoDB cache implementation.

Namespace

Drupal\mongodb

Code

public function delete($cid) {
  $this->collection
    ->remove(array(
    '_id' => (string) $cid,
  ));
}