PHP Class Bluz\Cache\Adapter\Redis

See also: Redis
Author: The-Who
Inheritance: extends AbstractAdapter
Show file Open project: bluzphp/framework Class Usage Examples

Protected Properties

Property Type Description
$handler instance
$settings default settings

Public Methods

Method Description
__construct ( array $settings = [] ) Check and setup Redis server
getHandler ( ) : Redis Get Redis handler

Protected Methods

Method Description
doAdd ( string $id, mixed $data, integer $ttl = Cache::TTL_NO_EXPIRY ) : boolean
doContains ( string $id ) : boolean
doDelete ( string $id ) : integer
doFlush ( )
doGet ( string $id ) : boolean | mixed | string
doSet ( string $id, mixed $data, integer $ttl = Cache::TTL_NO_EXPIRY ) : boolean

Method Details

__construct() public method

Check and setup Redis server
public __construct ( array $settings = [] )
$settings array

doAdd() protected method

protected doAdd ( string $id, mixed $data, integer $ttl = Cache::TTL_NO_EXPIRY ) : boolean
$id string
$data mixed
$ttl integer
return boolean

doContains() protected method

protected doContains ( string $id ) : boolean
$id string
return boolean

doDelete() protected method

protected doDelete ( string $id ) : integer
$id string
return integer Number of keys deleted.

doFlush() protected method

protected doFlush ( )

doGet() protected method

protected doGet ( string $id ) : boolean | mixed | string
$id string
return boolean | mixed | string

doSet() protected method

protected doSet ( string $id, mixed $data, integer $ttl = Cache::TTL_NO_EXPIRY ) : boolean
$id string
$data mixed
$ttl integer
return boolean

getHandler() public method

Get Redis handler
public getHandler ( ) : Redis
return Redis

Property Details

$handler protected property

instance
protected $handler

$settings protected property

default settings
protected $settings