You are here

public function MongoDBCache::__construct in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/doctrine/cache/lib/Doctrine/Common/Cache/MongoDBCache.php \Doctrine\Common\Cache\MongoDBCache::__construct()

Constructor.

This provider will default to the write concern and read preference options set on the MongoCollection instance (or inherited from MongoDB or MongoClient). Using an unacknowledged write concern (< 1) may make the return values of delete() and save() unreliable. Reading from secondaries may make contain() and fetch() unreliable.

Parameters

MongoCollection $collection:

See also

http://www.php.net/manual/en/mongo.readpreferences.php

http://www.php.net/manual/en/mongo.writeconcerns.php

File

vendor/doctrine/cache/lib/Doctrine/Common/Cache/MongoDBCache.php, line 74

Class

MongoDBCache
MongoDB cache provider.

Namespace

Doctrine\Common\Cache

Code

public function __construct(MongoCollection $collection) {
  $this->collection = $collection;
}