PHP Class Horde_Cache_Storage_Mongo, horde

Author: Michael Slusarz ([email protected])
Inheritance: extends Horde_Cache_Storage_Base
显示文件 Open project: horde/horde Class Usage Examples

Protected Properties

Property Type Description
$_db MongoCollection The MongoDB Collection object for the cache data.

Public Methods

Method Description
__construct ( array $params = [] ) Constructor.
__destruct ( ) Destructor.
clear ( )
exists ( $key, $lifetime )
expire ( $key )
get ( $key, $lifetime )
set ( $key, $data, $lifetime )

Protected Methods

Method Description
_getCid ( string $key ) : string Gets the cache ID for a key.
_initOb ( )

Method Details

__construct() public method

Constructor.
public __construct ( array $params = [] )
$params array Parameters:
  - collection: (string) The collection name.
  - mongo_db: [REQUIRED] (Horde_Mongo_Client) A MongoDB client object.

__destruct() public method

Destructor.
public __destruct ( )

_getCid() protected method

Gets the cache ID for a key.
protected _getCid ( string $key ) : string
$key string The key.
return string The cache ID.

_initOb() protected method

protected _initOb ( )

clear() public method

public clear ( )

exists() public method

public exists ( $key, $lifetime )

expire() public method

public expire ( $key )

get() public method

public get ( $key, $lifetime )

set() public method

public set ( $key, $data, $lifetime )

Property Details

$_db protected_oe property

The MongoDB Collection object for the cache data.
protected MongoCollection $_db
return MongoCollection