Class CI_Cache_memcached - echiong/testRepo GitHub Wiki

##Class CI_Cache_memcached

CodeIgniter Memcached Caching Class

Package: [[CodeIgniter<a href="Package CodeIgniter.Libraries.md">Libraries]]
Category: Core
Author: ExpressionEngine Dev Team
Link
Located at system/libraries/Cache/drivers/Cache_memcached.php

##Methods summary


public mixed get ( mixed $id )

Fetch from cache

Parameters

$id mixed
unique key id

Returns mixed
data on success/false on failure


public boolean save ( string $id, mixed $data, integer $ttl = 60 )

Save

Parameters

$id string
unique identifier

$data mixed
data being cached

$ttl integer
time to live

Returns boolean
true on success, false on failure


public boolean delete ( mixed $id )

Delete from Cache

Parameters

$id mixed
key to be deleted.

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 ( null $type = NULL )

Cache Info

Parameters

$type null
type not supported in memcached

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
FALSE on failure, array on success.


public is_supported ( )

Is supported

Returns FALSE if memcached is not supported on the system. If it is, we setup the memcached object & return TRUE

Methods inherited from CI_Driver

__call()

__get()

__set()

decorate()

<table class="summary" id="properties">
<caption>Properties summary</caption>
<tr data-order="_memcache_conf" id="$_memcache_conf">
	<td class="attributes"><code>
		protected  
		array
	</code></td>

	<td class="name">

$_memcache_conf

array( 'default' => array( 'default_host' => '127.0.0.1', 'default_port' => 11211, 'default_weight' => 1 ) )
#
		<div class="description detailed">
			

		</div>
	</div></td>
</tr>
</table>

<table class="summary inherited">
<caption>Properties inherited from <a href="Class CI_Driver.md#properties">CI_Driver</a></caption>
<tr>
	<td><code>
		<a href="Class CI_Driver.md#$parent"><var>$parent</var></a>
	</code></td>
</tr>
</table>
⚠️ **GitHub.com Fallback** ⚠️