My Project
 All Data Structures Namespaces Functions Variables
Public Member Functions | Protected Attributes
CI_Cache Class Reference
Inheritance diagram for CI_Cache:
CI_Driver_Library

Public Member Functions

 __construct ($config=array())
 
 get ($id)
 
 save ($id, $data, $ttl=60)
 
 delete ($id)
 
 clean ()
 
 cache_info ($type= 'user')
 
 get_metadata ($id)
 
 is_supported ($driver)
 
 __get ($child)
 
- Public Member Functions inherited from CI_Driver_Library
 __get ($child)
 

Protected Attributes

 $valid_drivers
 
 $_cache_path = NULL
 
 $_adapter = 'dummy'
 
 $_backup_driver
 
- Protected Attributes inherited from CI_Driver_Library
 $valid_drivers = array()
 
 $lib_name
 

Constructor & Destructor Documentation

__construct (   $config = array())

Constructor

Parameters
array

Member Function Documentation

__get (   $child)

__get()

Parameters
child
Returns
object
cache_info (   $type = 'user')

Cache Info

Parameters
stringuser/filehits
Returns
mixed array on success, false on failure
clean ( )

Clean the cache

Returns
boolean false on failure/true on success
delete (   $id)

Delete from Cache

Parameters
mixedunique identifier of the item in the cache
Returns
boolean true on success/false on failure
get (   $id)

Get

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

Parameters
string
Returns
mixed value that is stored/FALSE on failure
get_metadata (   $id)

Get Cache Metadata

Parameters
mixedkey to get cache metadata on
Returns
mixed return value from child method
is_supported (   $driver)

Is the requested driver supported in this environment?

Parameters
stringThe driver to test.
Returns
array
save (   $id,
  $data,
  $ttl = 60 
)

Cache Save

Parameters
stringUnique Key
mixedData to store
intLength of time (in seconds) to cache the data
Returns
boolean true on success/false on failure

Field Documentation

$valid_drivers
protected
Initial value:
= array(
'cache_apc', 'cache_file', 'cache_memcached', 'cache_dummy'
)

The documentation for this class was generated from the following file: