PHP Class Odesk\Phystrix\RequestCache

Afficher le fichier Open project: odesk/phystrix Class Usage Examples

Protected Properties

Свойство Type Description
$cachedResults array Associative array of results per command key per cache key

Méthodes publiques

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

Method Details

clear() public méthode

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

clearAll() public méthode

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

exists() public méthode

Returns true, if specified cache key exists
public exists ( string $commandKey, string $cacheKey ) : boolean
$commandKey string
$cacheKey string
Résultat boolean

get() public méthode

Attempts to obtain cached result for a given command type
public get ( string $commandKey, string $cacheKey ) : mixed | null
$commandKey string
$cacheKey string
Résultat mixed | null

put() public méthode

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

Property Details

$cachedResults protected_oe property

Associative array of results per command key per cache key
protected array $cachedResults
Résultat array