PHP Interface ManaPHP\Cache\AdapterInterface

Exibir arquivo Open project: manaphp/manaphp Interface Usage Examples

Public Methods

Method Description
delete ( string $key ) Deletes a value with the specified key from cache
exists ( string $key ) : boolean Checks whether a specified key exists in the cache.
get ( string $key ) : string | false Retrieves a value from cache with a specified key.
set ( string $key, string $value, integer $ttl ) : void Stores a value identified by a key into cache.

Method Details

delete() public method

Deletes a value with the specified key from cache
public delete ( string $key )
$key string

exists() public method

Checks whether a specified key exists in the cache.
public exists ( string $key ) : boolean
$key string
return boolean

get() public method

Retrieves a value from cache with a specified key.
public get ( string $key ) : string | false
$key string
return string | false

set() public method

Stores a value identified by a key into cache.
public set ( string $key, string $value, integer $ttl ) : void
$key string
$value string
$ttl integer
return void