\CI_Cache_file

CodeIgniter Memcached Caching Class

This class enables you to create drivers for a Library based on the Driver Library. It handles the drivers' access to the parent library

Summary

Methods
Properties
Constants
decorate()
__call()
__get()
__set()
__construct()
get()
save()
delete()
clean()
cache_info()
get_metadata()
is_supported()
No public properties found
No constants found
No protected methods found
$parent
$_cache_path
N/A
No private methods found
$methods
$properties
$reflections
N/A

Properties

$parent

$parent : 

Type

$_cache_path

$_cache_path : 

Type

$methods

$methods : 

Type

$properties

$properties : 

Type

$reflections

$reflections : 

Type

Methods

decorate()

decorate(  $parent) : void

Decorate

Decorates the child with the parent driver lib's methods and properties

Parameters

$parent

__call()

__call(  $method,   $args = array()) : mixed

__call magic method

Handles access to the parent driver library's methods

Parameters

$method
$args

Returns

mixed

__get()

__get(  $var) : mixed

__get magic method

Handles reading of the parent driver library's properties

Parameters

$var

Returns

mixed

__set()

__set(  $var,   $val) : mixed

__set magic method

Handles writing to the parent driver library's properties

Parameters

$var
$val

Returns

mixed

__construct()

__construct() 

Constructor

get()

get(  $id) : mixed

Fetch from cache

Parameters

$id

Returns

mixed —

data on success/false on failure

save()

save(  $id,   $data,   $ttl = 60) : boolean

Save into cache

Parameters

$id
$data
$ttl

Returns

boolean —

true on success/false on failure

delete()

delete(  $id) : boolean

Delete from Cache

Parameters

$id

Returns

boolean —

true on success/false on failure

clean()

clean() : boolean

Clean the Cache

Returns

boolean —

false on failure/true on success

cache_info()

cache_info(  $type = NULL) : mixed

Cache Info

Not supported by file-based caching

Parameters

$type

Returns

mixed —

FALSE

get_metadata()

get_metadata(  $id) : mixed

Get Cache Metadata

Parameters

$id

Returns

mixed —

FALSE on failure, array on success.

is_supported()

is_supported() : boolean

Is supported

In the file driver, check to see that the cache directory is indeed writable

Returns

boolean