Installation of 1.memcache
Http://www.cnblogs.com/zgx/archive/2011/08/10/2134097.html
Memcached-d-M 10-u root-l 192.168.15.128-p 12000-c 256-p/tmp/memcached.pid
parameter description: -D is to start a daemon -m is the amount of memory allocated to the memcache, in megabytes -u is the user running Memcache -L is the server IP address of the listener -p is the port to set memcache listening, preferably more than 1024 ports -theC option is the maximum number of concurrent connections to run, the default is 1024, According to the load of your server to set-P is set to save memcache PID file
2. Execute program error in memcache module
A Bytes-like object is required, not ' str '-error
The reasons are:
Python-memchached is isn't supported on Python 3.5 If you ve used python-memchached, the following commands would help you.
Pip Uninstall python-memcached
Pip Install python3-memcached
Example of 3.memcache
Import= memcache. Client (['192.168.15.128:12000'],debug=True) mc.set ("Some_key "Some value" = Mc.get ("Some_key " )print (ret)
Results:
Some value
Some methods of 4.memcache
Http://www.cnblogs.com/wupeiqi/articles/5132791.html
Python Memcache and Redis