\CI_Cache

CodeIgniter Caching Class

This class enables you to create "Driver" libraries that add runtime ability to extend the capabilities of a class via additional driver objects

Summary

Methods
Properties
Constants
__get()
__construct()
get()
save()
delete()
clean()
cache_info()
get_metadata()
is_supported()
No public properties found
No constants found
No protected methods found
$valid_drivers
$lib_name
$_cache_path
$_adapter
$_backup_driver
N/A
_initialize()
No private properties found
N/A

Properties

$valid_drivers

$valid_drivers : 

Type

$lib_name

$lib_name : 

Type

$_cache_path

$_cache_path : 

Type

$_adapter

$_adapter : 

Type

$_backup_driver

$_backup_driver : 

Type

Methods

__get()

__get(  $child) : object

__get()

Parameters

$child

Returns

object

__construct()

__construct(  $config = array()) 

Constructor

Parameters

$config

get()

get(  $id) : mixed

Get

Look for a value in the cache. If it exists, return the data if not, return FALSE

Parameters

$id

Returns

mixed —

value that is stored/FALSE on failure

save()

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

Cache Save

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 = 'user') : mixed

Cache Info

Parameters

$type

Returns

mixed —

array on success, false on failure

get_metadata()

get_metadata(  $id) : mixed

Get Cache Metadata

Parameters

$id

Returns

mixed —

return value from child method

is_supported()

is_supported(  $driver) : array

Is the requested driver supported in this environment?

Parameters

$driver

Returns

array

_initialize()

_initialize(  $config) : void

Initialize

Initialize class properties based on the configuration array.

Parameters

$config