PHP Трейт Rinvex\Repository\Traits\Cacheable

Показать файл Открыть проект

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

Свойство Тип Описание
$cacheClearEnabled boolean Indicate if the repository cache clear is enabled.
$cacheDriver string The repository cache driver.
$cacheLifetime float | integer The repository cache lifetime.

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

Метод Описание
enableCacheClear ( boolean $status = true ) Enable repository cache clear.
forgetCache ( ) Forget the repository cache.
getCacheDriver ( ) : string Get the repository cache driver.
getCacheLifetime ( ) : float | integer Get the repository cache lifetime.
isCacheClearEnabled ( ) : boolean Determine if repository cache clear is enabled.
setCacheDriver ( string $cacheDriver ) Set the repository cache driver.
setCacheLifetime ( float | integer $cacheLifetime ) Set the repository cache lifetime.

Защищенные методы

Метод Описание
cacheCallback ( string $class, string $method, array $args, Closure $closure ) : mixed Cache given callback.
flushCacheKeys ( ) : array Flush cache keys by mimicking cache tags.
generateCacheHash ( $args ) : string Generate unique query hash.
getCacheKeys ( string $file ) : array Get cache keys.
resetCachedRepository ( ) Reset cached repository to it's defaults.
storeCacheKeys ( string $class, string $method, string $hash ) : void Store cache keys by mimicking cache tags.

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

cacheCallback() защищенный Метод

Cache given callback.
protected cacheCallback ( string $class, string $method, array $args, Closure $closure ) : mixed
$class string
$method string
$args array
$closure Closure
Результат mixed

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

Enable repository cache clear.
public enableCacheClear ( boolean $status = true )
$status boolean

flushCacheKeys() защищенный Метод

Flush cache keys by mimicking cache tags.
protected flushCacheKeys ( ) : array
Результат array

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

Forget the repository cache.
public forgetCache ( )

generateCacheHash() защищенный Метод

Generate unique query hash.
protected generateCacheHash ( $args ) : string
$args
Результат string

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

Get the repository cache driver.
public getCacheDriver ( ) : string
Результат string

getCacheKeys() защищенный Метод

Get cache keys.
protected getCacheKeys ( string $file ) : array
$file string
Результат array

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

Get the repository cache lifetime.
public getCacheLifetime ( ) : float | integer
Результат float | integer

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

Determine if repository cache clear is enabled.
public isCacheClearEnabled ( ) : boolean
Результат boolean

resetCachedRepository() защищенный Метод

Reset cached repository to it's defaults.
protected resetCachedRepository ( )

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

Set the repository cache driver.
public setCacheDriver ( string $cacheDriver )
$cacheDriver string

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

Set the repository cache lifetime.
public setCacheLifetime ( float | integer $cacheLifetime )
$cacheLifetime float | integer

storeCacheKeys() защищенный Метод

Store cache keys by mimicking cache tags.
protected storeCacheKeys ( string $class, string $method, string $hash ) : void
$class string
$method string
$hash string
Результат void

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

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

Indicate if the repository cache clear is enabled.
protected bool $cacheClearEnabled
Результат boolean

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

The repository cache driver.
protected string $cacheDriver
Результат string

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

The repository cache lifetime.
protected float|int $cacheLifetime
Результат float | integer