PHP Класс Webiny\Component\Rest\Response\Cache

It is also used to acquire the cache key.
Наследование: use trait Webiny\Component\Http\HttpTrait, use trait Webiny\Component\StdLib\StdLibTrait, use trait Webiny\Component\Cache\CacheTrait
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
__construct ( RequestBag $requestBag ) Base constructor.
getCallbackResultFromCache ( ) : boolean | mixed Tries to get the result for the given api request from the cache.
getFromCache ( RequestBag $requestBag ) : boolean | mixed Tries to get the result for the given api request from the cache.
purgeCacheResult ( ) : boolean Purges the cached result.
purgeResult ( RequestBag $requestBag ) : boolean Purges the cached result.
saveCallbackResult ( mixed $result ) : boolean Saves the result into cache.
saveResult ( RequestBag $requestBag, mixed $result ) : boolean Saves the result from the given api request into cache.

Приватные методы

Метод Описание
getCacheKey ( ) : string Computes the cache key, or gets it from the implemented interface from the api class.

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

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

Base constructor.
public __construct ( RequestBag $requestBag )
$requestBag RequestBag

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

Tries to get the result for the given api request from the cache.
public getCallbackResultFromCache ( ) : boolean | mixed
Результат boolean | mixed False or the actual result from cache.

getFromCache() публичный статический Метод

Tries to get the result for the given api request from the cache.
public static getFromCache ( RequestBag $requestBag ) : boolean | mixed
$requestBag RequestBag
Результат boolean | mixed False or the actual result from cache.

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

Purges the cached result.
public purgeCacheResult ( ) : boolean
Результат boolean

purgeResult() публичный статический Метод

Purges the cached result.
public static purgeResult ( RequestBag $requestBag ) : boolean
$requestBag RequestBag
Результат boolean

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

Saves the result into cache.
public saveCallbackResult ( mixed $result ) : boolean
$result mixed Result that should be saved.
Результат boolean

saveResult() публичный статический Метод

Saves the result from the given api request into cache.
public static saveResult ( RequestBag $requestBag, mixed $result ) : boolean
$requestBag RequestBag
$result mixed
Результат boolean