Skip to content

Instantly share code, notes, and snippets.

@hjr3
Last active December 17, 2015 13:49
Show Gist options
  • Save hjr3/5620086 to your computer and use it in GitHub Desktop.
Save hjr3/5620086 to your computer and use it in GitHub Desktop.
Memcache timeout examples
<?php
$m = new Memcache;
$m->addServer('127.0.0.1', 11211);
$m->addServer('127.0.0.1', 11214); // down
$m->set('foo', 'bar');
$foo = $m->get('foo');
var_dump($foo);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment