PHP Class Jenner\SimpleFork\Cache\RedisCache

Inheritance: implements Jenner\SimpleFork\Cache\CacheInterface
Exibir arquivo Open project: huyanping/simple-fork-php Class Usage Examples

Protected Properties

Property Type Description
$prefix
$redis Redis

Public Methods

Method Description
__construct ( string $host = '127.0.0.1', integer $port = 6379, integer $database, string $prefix = 'simple-fork' )
__destruct ( ) close redis connection
close ( ) close the connection
delete ( $key ) : boolean delete var
get ( $key, null $default = null ) : boolean | string | null get var
has ( $key ) : boolean has var ?
set ( $key, null $value ) : boolean set var

Method Details

__construct() public method

public __construct ( string $host = '127.0.0.1', integer $port = 6379, integer $database, string $prefix = 'simple-fork' )
$host string
$port integer
$database integer
$prefix string

__destruct() public method

close redis connection
public __destruct ( )

close() public method

close the connection
public close ( )

delete() public method

delete var
public delete ( $key ) : boolean
$key
return boolean

get() public method

get var
public get ( $key, null $default = null ) : boolean | string | null
$key
$default null
return boolean | string | null

has() public method

has var ?
public has ( $key ) : boolean
$key
return boolean

set() public method

set var
public set ( $key, null $value ) : boolean
$key
$value null
return boolean

Property Details

$prefix protected_oe property

protected $prefix

$redis protected_oe property

protected Redis $redis
return Redis