PHP Class Cache

Mostra file Open project: bcosca/fatfree Class Usage Examples

Protected Properties

Property Type Description
$dsn
$prefix
$ref

Public Methods

Method Description
__construct ( $dsn = FALSE ) : object Class constructor
clear ( $key ) : boolean Delete cache entry
exists ( $key, &$val = NULL ) : array | FALSE Return timestamp and TTL of cache entry or FALSE if not found
get ( $key ) : mixed | FALSE Retrieve value of cache entry
load ( $dsn ) : string Load/auto-detect cache backend
reset ( $suffix = NULL, $lifetime ) : boolean Clear contents of cache backend
set ( $key, $val, $ttl ) : mixed | FALSE Store value in cache

Method Details

__construct() public method

Class constructor
public __construct ( $dsn = FALSE ) : object
$dsn bool|string
return object

clear() public method

Delete cache entry
public clear ( $key ) : boolean
$key string
return boolean

exists() public method

Return timestamp and TTL of cache entry or FALSE if not found
public exists ( $key, &$val = NULL ) : array | FALSE
$key string
$val mixed
return array | FALSE

get() public method

Retrieve value of cache entry
public get ( $key ) : mixed | FALSE
$key string
return mixed | FALSE

load() public method

Load/auto-detect cache backend
public load ( $dsn ) : string
$dsn bool|string
return string

reset() public method

Clear contents of cache backend
public reset ( $suffix = NULL, $lifetime ) : boolean
$suffix string
$lifetime int
return boolean

set() public method

Store value in cache
public set ( $key, $val, $ttl ) : mixed | FALSE
$key string
$val mixed
$ttl int
return mixed | FALSE

Property Details

$dsn protected_oe property

protected $dsn

$prefix protected_oe property

protected $prefix

$ref protected_oe property

protected $ref