PHP Класс Habari\FileCache

Stores cache data in local files
Наследование: extends Cache
Показать файл Открыть проект

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

Свойство Тип Описание
$cache_data
$cache_files
$cache_location
$enabled
$index_file

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

Метод Описание
__construct ( ) Constructor for FileCache

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

Метод Описание
_expire ( string $name, string $group, string $match_mode = 'strict' ) Expires the named value from the cache.
_expired ( string $name, string $group ) : boolean Return whether a named cache value has expired
_extend ( string $name, integer $expiry, $group ) Extend the expiration of the named cached value.
_get ( string $name, $group ) : mixed Returns the named value from the cache.
_get_group ( $group ) : mixed Returns the group from the cache.
_has ( string $name, $group ) : boolean Is record with $name in the cache?
_has_group ( $group ) : boolean Is group in the cache?
_purge ( ) Remove all cache files
_set ( $name, $value, $expiry, $group, $keep )

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

Метод Описание
clear_expired ( ) Purge expired items from the cache.
get_group_hash ( $group ) Get the unique hash for a given key.
get_name_hash ( string $name ) Get the unique hash for a given key.
record_fresh ( $record ) Check whether a given record is still fresh (e.g. has not expired).

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

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

Sets up paths etc. and reads cache index, if it exists.
public __construct ( )

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

Expires the named value from the cache.
protected _expire ( string $name, string $group, string $match_mode = 'strict' )
$name string The name of the cached item
$group string The name of the cache group
$match_mode string (optional) how to match bucket names ('strict', 'regex', 'glob') (default 'strict')

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

Return whether a named cache value has expired
protected _expired ( string $name, string $group ) : boolean
$name string The name of the cached item
$group string The group of the cached item
Результат boolean true if the stored value has expired

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

Extend the expiration of the named cached value.
protected _extend ( string $name, integer $expiry, $group )
$name string The name of the cached item
$expiry integer The duration in seconds to extend the cache expiration by

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

Returns the named value from the cache.
protected _get ( string $name, $group ) : mixed
$name string The name of the cached item
Результат mixed The item value or null if it doesn't exist in cache

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

Returns the group from the cache.
protected _get_group ( $group ) : mixed
Результат mixed The group or array() if it doesn't exist in cache

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

Is record with $name in the cache?
protected _has ( string $name, $group ) : boolean
$name string name of the cached item
Результат boolean true if item is cached, false if not

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

Is group in the cache?
protected _has_group ( $group ) : boolean
Результат boolean true if item is cached, false if not

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

Remove all cache files
protected _purge ( )

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

protected _set ( $name, $value, $expiry, $group, $keep )

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

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

protected $cache_data

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

protected $cache_files

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

protected $cache_location

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

protected $enabled

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

protected $index_file