Tuesday 23 August 2016

Connecting to Memcached Server

Step 1: Start memcahed server.
Open terminal and type the command ‘memcached’.

Step 2: Above command starts the server, open new terminal and use telnet to connect to memcached server.
telnet <hostname> <port>


By default memcached server listen on port 11211.
$ telnet 127.0.0.1 11211
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.


Once you connected to server, you can able to perform all CRUD operations.
$ telnet 127.0.0.1 11211
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
set harikrishna 0 900 11
memcached

STORED
get harikrishna
VALUE harikrishna 0 11
memcached

END


After executing any commands like set, get you need to type memcahed and press Enter.


Previous                                                 Next                                                 Home

No comments:

Post a Comment