Class CI_Cache - echiong/testRepo GitHub Wiki
##Class CI_Cache
CodeIgniter Caching Class
Package: [[CodeIgniter<a href="Package CodeIgniter.Libraries.md">Libraries]]
Category:
Core
Author:
ExpressionEngine Dev Team
Link
Located at system/libraries/Cache/Cache.php
##Methods summary
public __construct ( array $config = array() )
Constructor
Parameters
$config
array
public mixed get ( string $id )
Get
Look for a value in the cache. If it exists, return the data if not, return FALSE
Parameters
$id
string
Returns
mixed
value that is stored/FALSE on failure
public boolean save ( string $id, mixed $data, integer $ttl = 60 )
Cache Save
Parameters
$id
string
Unique Key
$data
mixed
Data to store
$ttl
integer
Length of time (in seconds) to cache the data
Returns
boolean
true on success/false on failure
public boolean delete ( mixed $id )
Delete from Cache
Parameters
$id
mixed
unique identifier of the item in the cache
Returns
boolean
true on success/false on failure
public boolean clean ( )
Clean the cache
Returns
boolean
false on failure/true on success
public mixed cache_info ( string $type = 'user' )
Cache Info
Parameters
$type
string
user/filehits
Returns
mixed
array on success, false on failure
public mixed get_metadata ( mixed $id )
Get Cache Metadata
Parameters
$id
mixed
key to get cache metadata on
Returns
mixed
return value from child method
public array is_supported ( string $driver )
Is the requested driver supported in this environment?
Parameters
$driver
string
The driver to test.
Returns
array
public object __get ( child $child )
__get()
Parameters
$child
child
Returns
object
###Overrides CI_Driver_Library::__get()
<table class="summary" id="properties">
<caption>Properties summary</caption>
<tr data-order="valid_drivers" id="$valid_drivers">
<td class="attributes"><code>
protected
array
</code></td>
<td class="name">
$valid_drivers
array(
'cache_apc', 'cache_file', 'cache_memcached', 'cache_dummy'
)
<div class="description detailed">
</div>
</div></td>
</tr>
<tr data-order="_cache_path" id="$_cache_path">
<td class="attributes"><code>
protected
mixed
</code></td>
<td class="name">
$_cache_path
NULL
<div class="description detailed">
</div>
</div></td>
</tr>
<tr data-order="_adapter" id="$_adapter">
<td class="attributes"><code>
protected
string
</code></td>
<td class="name">
$_adapter
'dummy'
<div class="description detailed">
</div>
</div></td>
</tr>
<tr data-order="_backup_driver" id="$_backup_driver">
<td class="attributes"><code>
protected
mixed
</code></td>
<td class="name">
$_backup_driver
<div class="description detailed">
</div>
</div></td>
</tr>
</table>
<table class="summary inherited">
<caption>Properties inherited from <a href="Class CI_Driver_Library.md#properties">CI_Driver_Library</a></caption>
<tr>
<td><code>
<a href="Class CI_Driver_Library.md#$lib_name"><var>$lib_name</var></a>
</code></td>
</tr>
</table>