PHP Class Horde_Cache_Storage_File, horde

Author: Anil Madhavapeddy ([email protected])
Author: Chuck Hagenbuch ([email protected])
Author: Michael Slusarz ([email protected])
Inheritance: extends Horde_Cache_Storage_Base
Afficher le fichier Open project: horde/horde

Protected Properties

Свойство Type Description
$_file array List of key to filename mappings.

Méthodes publiques

Méthode Description
__construct ( array $params = [] ) Constructor.
__destruct ( ) Destructor.
clear ( )
exists ( $key, $lifetime )
expire ( $key )
get ( $key, $lifetime )
set ( $key, $data, $lifetime )

Méthodes protégées

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

Method Details

__construct() public méthode

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() public méthode

Destructor.
public __destruct ( )

_gc() protected méthode

Garbage collector.
protected _gc ( )

_getCacheFiles() protected méthode

Return a list of cache files.
protected _getCacheFiles ( string $start = null ) : array
$start string The directory to start searching.
Résultat array Pathnames to cache files.

_getGCFiles() protected méthode

Return a list of GC indexes.
protected _getGCFiles ( ) : array
Résultat array Pathnames to GC indexes.

_keyToFile() protected méthode

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?
Résultat string Fully qualified filename.

_migrateGc() protected méthode

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

clear() public méthode

public clear ( )

exists() public méthode

public exists ( $key, $lifetime )

expire() public méthode

public expire ( $key )

get() public méthode

public get ( $key, $lifetime )

set() public méthode

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

Property Details

$_file protected_oe property

List of key to filename mappings.
protected array $_file
Résultat array