Windows Env: https://memcached.org/
Download the package http://www.memcached.org/files/memcached-1.6.10.tar.gz
MAC Env: Install with Homebrew
Install memcached with Homebrew
brew install memcached
Try to stop and start memcached from cmd
brew services start memcached
brew services restart memcached
brew services stop memcached
Output
(base) haithai@FVFY201CHV2H ~ % brew services stop memcached
Stopping `memcached`... (might take a while)
==> Successfully stopped `memcached` (label: homebrew.mxcl.memcached)
(base) haithai@FVFY201CHV2H ~ % brew services start memcached
==> Successfully started `memcached` (label: homebrew.mxcl.memcached)
(base) haithai@FVFY201CHV2H ~ %
Verify memcached — make sure it is working correctly
Using the Memcached Telnet Interface You can connect to the Memcached server with Telnet.
telnet localhost 11211
Set/Get a Cache Item (The basic syntax of the command is set as follows)
# cmd for set a key with options
set key flags exptime bytes [noreply]
value
# cmd for get a key ( return a value )
get key
Example
(base) haithai@FVFY201CHV2H ~ % telnet localhost 11211
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
set mykey 0 900 5
hello
STORED
get mykey
VALUE mykey 0 5
hello
END