PHP Class Jenner\SimpleFork\Cache\RedisCache

Inheritance: implements Jenner\SimpleFork\Cache\CacheInterface
Afficher le fichier Open project: huyanping/simple-fork-php Class Usage Examples

Protected Properties

Свойство Type Description
$prefix
$redis Redis

Méthodes publiques

Méthode 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 méthode

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 méthode

close redis connection
public __destruct ( )

close() public méthode

close the connection
public close ( )

delete() public méthode

delete var
public delete ( $key ) : boolean
$key
Résultat boolean

get() public méthode

get var
public get ( $key, null $default = null ) : boolean | string | null
$key
$default null
Résultat boolean | string | null

has() public méthode

has var ?
public has ( $key ) : boolean
$key
Résultat boolean

set() public méthode

set var
public set ( $key, null $value ) : boolean
$key
$value null
Résultat boolean

Property Details

$prefix protected_oe property

protected $prefix

$redis protected_oe property

protected Redis $redis
Résultat Redis