Memcached on Windows Vista
If you're planning to use the Windows port of Memcached, be careful how you connect to the server in your code. Using the PHP memcache extension, I tried to connect to localhost:
(Sidenote for New Zealanders: This sounds like a "get better work stories" advertisement. At first we thought there might have been a compatibility issue, but, in the end, it turned out to be, uh, the refresh rate.)
$memCache->connect('localhost', 11211);But I couldn't connect. I kept receiving error 10060 - "A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond." I checked with netstat, and Memcached was indeed listening on 0.0.0.0:11211. In the end it turned out that localhost was resolving to ::1: (IPV6) rather than the more traditional 127.0.0.1 (IPV4). Specifying the local IP address ('127.0.0.1') instead of 'localhost' fixed everything.
$memCache->set('test', 'Hello, Memory!');
(Sidenote for New Zealanders: This sounds like a "get better work stories" advertisement. At first we thought there might have been a compatibility issue, but, in the end, it turned out to be, uh, the refresh rate.)