In the example it shows:
/* expire 'object' key in 5 minutes */
$m->set('object', new stdclass, time() + 300);
But this is wrong.
It will not expire, at least, not for a long long time.
So instead of time() + seconds, you use:
$m->set('object', new stdclass, 300);
And it will correctly expire after 5 minutes.
Note: Using memcached 2.1.0 stable through PECL.