You are here

public function CacheBackendMongodb::__construct in MongoDB 8

Constructs a CacheBackendMongodb object.

Parameters

\MongoCollection $bin: The cache bin MongoClient object for which the object is created.

File

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

Class

CacheBackendMongodb
Defines MongoDB cache implementation.

Namespace

Drupal\mongodb

Code

public function __construct(\MongoCollection $collection, CacheTagsChecksumInterface $checksum_provider) {

  // All cache tables should be prefixed with 'cache_', except for the
  // default 'cache' bin.
  $this->collection = $collection;
  $this->checksumProvider = $checksum_provider;
}