phalcon/cphalcon — pull request #913 by kjdev (2013-07-24 23:40:33+00:00)
Title: Additional: Phalcon\Cache\Backend\Libmemcached

class Phalcon\Cache\Backend\Libmemcached

cache backend class by using memcached PECL extension.

```php
// Cache data for 2 days
$frontCache = new Phalcon\Cache\Frontend\Data(array(
"lifetime" => 172800
));

//Create the Cache setting memcached connection options
$cache = new Phalcon\Cache\Backend\Libmemcached($frontCache, array(
'servers' => array(
array('host' => 'localhost',
'port' => 11211,
'weight' => 1),
),
'client' => array(
Memcached::OPT_HASH => Memcached::HASH_MD5,
Memcached::OPT_PREFIX_KEY => 'prefix.',
)
));

//Cache arbitrary data
$cache->save('my-data', array(1, 2, 3, 4, 5));

//Get data
$data = $cache->get('my-data');
```

Options specified constructor is unlike Phalcon\Cache\Backend\Memcache.
Others are the same.