Skip to content

Instantly share code, notes, and snippets.

@m6w6
Created August 7, 2013 20:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save m6w6/6178602 to your computer and use it in GitHub Desktop.
Save m6w6/6178602 to your computer and use it in GitHub Desktop.
<?php
$key='MYKEY';
$memcached = new Memcached();
$memcached->addServer('127.0.1.2', 11211);
$memcached->addServer('127.0.2.2', 11211);
$memcached->addServer('127.0.3.2', 11211);
$memcached->addServer('127.0.4.2', 11211);
$memcached->addServer('127.0.5.2', 11211);
$memcached->addServer('127.0.6.2', 11211);
$memcached->add($key, "TEST", 600);
$serverData = $memcached->getServerByKey($key);
var_export($serverData);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment