PHP Class CI_Cache_file, TastyIgniter

Author: ExpressionEngine Dev Team
Inheritance: extends CI_Driver
Datei anzeigen Open project: tastyigniter/tastyigniter

Protected Properties

Property Type Description
$_cache_path string Directory in which to save cache files

Public Methods

Method Description
__construct ( ) : void Initialize file-based cache
cache_info ( $type = NULL ) : mixed Cache Info
clean ( ) : boolean Clean the Cache
decrement ( string $id, integer $offset = 1 ) : New Decrement a raw value
delete ( $id ) : boolean Delete from Cache
get ( string $id ) : mixed Fetch from cache
get_metadata ( $id ) : mixed Get Cache Metadata
increment ( string $id, integer $offset = 1 ) : New Increment a raw value
is_supported ( ) : boolean Is supported
save ( string $id, mixed $data, integer $ttl = 60, boolean $raw = FALSE ) : boolean Save into cache

Protected Methods

Method Description
_get ( string $id ) : mixed Get all data

Method Details

__construct() public method

Initialize file-based cache
public __construct ( ) : void
return void

_get() protected method

Internal method to get all the relevant data about a cache item
protected _get ( string $id ) : mixed
$id string Cache ID
return mixed Data array on success or FALSE on failure

cache_info() public method

Not supported by file-based caching
public cache_info ( $type = NULL ) : mixed
return mixed FALSE

clean() public method

Clean the Cache
public clean ( ) : boolean
return boolean false on failure/true on success

decrement() public method

Decrement a raw value
public decrement ( string $id, integer $offset = 1 ) : New
$id string Cache ID
$offset integer Step/value to reduce by
return New value on success, FALSE on failure

delete() public method

Delete from Cache
public delete ( $id ) : boolean
return boolean true on success/false on failure

get() public method

Fetch from cache
public get ( string $id ) : mixed
$id string Cache ID
return mixed Data on success, FALSE on failure

get_metadata() public method

Get Cache Metadata
public get_metadata ( $id ) : mixed
return mixed FALSE on failure, array on success.

increment() public method

Increment a raw value
public increment ( string $id, integer $offset = 1 ) : New
$id string Cache ID
$offset integer Step/value to add
return New value on success, FALSE on failure

is_supported() public method

In the file driver, check to see that the cache directory is indeed writable
public is_supported ( ) : boolean
return boolean

save() public method

Save into cache
public save ( string $id, mixed $data, integer $ttl = 60, boolean $raw = FALSE ) : boolean
$id string Cache ID
$data mixed Data to store
$ttl integer Time to live in seconds
$raw boolean Whether to store the raw value (unused)
return boolean TRUE on success, FALSE on failure

Property Details

$_cache_path protected_oe property

Directory in which to save cache files
protected string $_cache_path
return string