PHP Класс MongolidLaravel\LaravelCacheComponent

Наследование: implements Mongolid\Util\CacheComponentInterface
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
__construct ( Illuminate\Cache\Repository $laravelCache, Serializer $serializer ) Injects the dependencies of LaravelCacheComponent
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.

Описание методов

__construct() публичный метод

Injects the dependencies of LaravelCacheComponent
public __construct ( Illuminate\Cache\Repository $laravelCache, Serializer $serializer )
$laravelCache Illuminate\Cache\Repository Cache component that will be used to store.
$serializer Mongolid\Serializer\Serializer Serializer that will serialize the objects.

get() публичный метод

Retrieve an item from the cache by key.
public get ( string $key ) : mixed
$key string Cache key of the item to be retrieved.
Результат mixed

has() публичный метод

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.
Результат boolean Has cache key.

put() публичный метод

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.
Результат void