PHP Класс Horde_Cache_Storage_File, horde

Автор: Anil Madhavapeddy ([email protected])
Автор: Chuck Hagenbuch ([email protected])
Автор: Michael Slusarz ([email protected])
Наследование: extends Horde_Cache_Storage_Base
Показать файл Открыть проект

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

Свойство Тип Описание
$_file array List of key to filename mappings.

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

Метод Описание
__construct ( array $params = [] ) Constructor.
__destruct ( ) Destructor.
clear ( )
exists ( $key, $lifetime )
expire ( $key )
get ( $key, $lifetime )
set ( $key, $data, $lifetime )

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

Метод Описание
_gc ( ) Garbage collector.
_getCacheFiles ( string $start = null ) : array Return a list of cache files.
_getGCFiles ( ) : array Return a list of GC indexes.
_keyToFile ( string $key, string $create = false ) : string Map a cache key to a unique filename.
_migrateGc ( ) Migrates single GC indexes to per-directory indexes.

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

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

Constructor.
public __construct ( array $params = [] )
$params array Optional parameters:
  - dir: (string) The base directory to store the cache files in.
         DEFAULT: System default
  - no_gc: (boolean) If true, don't perform garbage collection.
           DEFAULT: false
  - prefix: (string) The filename prefix to use for the cache files.
            DEFAULT: 'cache_'
  - sub: (integer) If non-zero, the number of subdirectories to create
         to store the file (i.e. PHP's session.save_path).
         DEFAULT: 0

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

Destructor.
public __destruct ( )

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

Garbage collector.
protected _gc ( )

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

Return a list of cache files.
protected _getCacheFiles ( string $start = null ) : array
$start string The directory to start searching.
Результат array Pathnames to cache files.

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

Return a list of GC indexes.
protected _getGCFiles ( ) : array
Результат array Pathnames to GC indexes.

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

Map a cache key to a unique filename.
protected _keyToFile ( string $key, string $create = false ) : string
$key string Cache key.
$create string Create path if it doesn't exist?
Результат string Fully qualified filename.

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

Migrates single GC indexes to per-directory indexes.
protected _migrateGc ( )

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

public clear ( )

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

public exists ( $key, $lifetime )

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

public expire ( $key )

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

public get ( $key, $lifetime )

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

public set ( $key, $data, $lifetime )

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

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

List of key to filename mappings.
protected array $_file
Результат array