PHP Class Doctrine\Common\Cache\MongoDBCache

Since: 1.1
Author: Jeremy Mikola ([email protected])
Inheritance: extends CacheProvider
Datei anzeigen Open project: doctrine/cache Class Usage Examples

Public Methods

Method Description
__construct ( MongoCollection $collection ) Constructor.

Protected Methods

Method Description
doContains ( $id )
doDelete ( $id )
doFetch ( $id )
doFlush ( )
doGetStats ( )
doSave ( $id, $data, $lifeTime )

Private Methods

Method Description
isExpired ( array $document ) : boolean Check if the document is expired.

Method Details

__construct() public method

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.
See also: http://www.php.net/manual/en/mongo.readpreferences.php
See also: http://www.php.net/manual/en/mongo.writeconcerns.php
public __construct ( MongoCollection $collection )
$collection MongoCollection

doContains() protected method

protected doContains ( $id )

doDelete() protected method

protected doDelete ( $id )

doFetch() protected method

protected doFetch ( $id )

doFlush() protected method

protected doFlush ( )

doGetStats() protected method

protected doGetStats ( )

doSave() protected method

protected doSave ( $id, $data, $lifeTime )