Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Additional: Phalcon\Cache\Backend\Libmemcached #913

Merged
merged 1 commit into from
Jul 25, 2013
Merged

Conversation

kjdev
Copy link
Contributor

@kjdev kjdev commented Jul 24, 2013

class Phalcon\Cache\Backend\Libmemcached

cache backend class by using memcached PECL extension.

// 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.

cache backend class by using memcached PECL extension.
@phalcon
Copy link
Collaborator

phalcon commented Jul 25, 2013

Can you please submit the Libmemcached adapter to 1.3.0?

phalcon pushed a commit that referenced this pull request Jul 25, 2013
Additional: Phalcon\Cache\Backend\Libmemcached
@phalcon phalcon merged commit 6fdc9c0 into phalcon:1.3.0 Jul 25, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants