How do I connect to Python-memcached using the path to memcached.sock? (Python 2.7)
Memcached comes pre-installed on my host (Webfaction). I have started it and verified that it is running. I also verified that memcached.sock is in my home directory. The documentation says:
"Once your Memcached instance is up and running, you can access it by the path of the socket file (~/memcached.sock) with the software or library which uses memcached."
I have tried this:
import memcache
mc = memcache.Client(['127.0.0.1:11211'], debug=1)
mc.set("some_key", "Some value")
But I get an error on mc.set:
Connection refused. Marking dead.
I have also tried
mc = memcache.Client('~/memcached.sock', debug=1)
Then the error on mc.set is
Name or service not known. Marking dead.