PHP Класс Odesk\Phystrix\RequestCache

Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$cachedResults array Associative array of results per command key per cache key

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

Метод Описание
clear ( string $commandKey, string $cacheKey ) Clears the cache for a given cacheKey, for a given commandKey
clearAll ( string $commandKey ) Clears the cache for a given commandKey only
exists ( string $commandKey, string $cacheKey ) : boolean Returns true, if specified cache key exists
get ( string $commandKey, string $cacheKey ) : mixed | null Attempts to obtain cached result for a given command type
put ( string $commandKey, string $cacheKey, mixed $result ) Puts request result into cache for a given command type

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

clear() публичный Метод

Clears the cache for a given cacheKey, for a given commandKey
public clear ( string $commandKey, string $cacheKey )
$commandKey string
$cacheKey string

clearAll() публичный Метод

Clears the cache for a given commandKey only
public clearAll ( string $commandKey )
$commandKey string

exists() публичный Метод

Returns true, if specified cache key exists
public exists ( string $commandKey, string $cacheKey ) : boolean
$commandKey string
$cacheKey string
Результат boolean

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

Attempts to obtain cached result for a given command type
public get ( string $commandKey, string $cacheKey ) : mixed | null
$commandKey string
$cacheKey string
Результат mixed | null

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

Puts request result into cache for a given command type
public put ( string $commandKey, string $cacheKey, mixed $result )
$commandKey string
$cacheKey string
$result mixed

Описание свойств

$cachedResults защищенное свойство

Associative array of results per command key per cache key
protected array $cachedResults
Результат array