PHP Interface Mongolid\Util\CacheComponentInterface

Datei anzeigen Open project: leroy-merlin-br/mongolid

Public Methods

Method Description
get ( string $key ) : mixed Retrieve an item from the cache by key.
has ( string $key ) : boolean Determine if an item exists in the cache. This method will also check if the ttl of the given cache key has been expired and will free the memory if so.
put ( string $key, mixed $value, float $minutes ) : void Store an item in the cache for a given number of minutes.

Method Details

get() public method

Retrieve an item from the cache by key.
public get ( string $key ) : mixed
$key string Cache key of the item to be retrieved.
return mixed

has() public method

Determine if an item exists in the cache. This method will also check if the ttl of the given cache key has been expired and will free the memory if so.
public has ( string $key ) : boolean
$key string Cache key of the item.
return boolean Has cache key.

put() public method

Store an item in the cache for a given number of minutes.
public put ( string $key, mixed $value, float $minutes ) : void
$key string Cache key of the item.
$value mixed Value being stored in cache.
$minutes float Cache ttl.
return void