Steps to take:
Prerequisite: read the manual (at least a bit): http://php.net/manual/en/book.memcache.php and make sure you've got memcached installed.
1 Start the memcached program so there is a server that actually stores the key-value pairs.
2 Make a memcache object
3 Store a value for a key
4 Retrieve your key.
$memcache = new Memcache; //point 2.
$memcache->set($yourUniqueKey, $yourValue, false, 3600); //point 3
//later:
$memcache->get($yourUniqueKey); //point 4.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…