Memcached comma...login
Memcached command operation manual
author:php.cn  update time:2022-04-13 17:53:40

Memcached connection


We can connect to the Memcached service through the telnet command and specify the host IP and port.

Syntax

telnet HOST PORT

HOST and PORT in the command are the IP and port where the Memcached service is running.

Example

The following example demonstrates how to connect to the Memcached service and execute simple set and get commands.

The Memcached service of this instance runs on the host 127.0.0.1 (this machine) and the port is 11211.

telnet 127.0.0.1 11211

Trying 127.0.0.1...

Connected to 127.0.0.1.

Escape character is '^]'.

set foo 0 0 3                                                   保存命令

bar                                                             数据

STORED                                                          结果

get foo                                                         取得命令

VALUE foo 0 3                                                   数据

bar                                                             数据

END                                                             结束行

quit                                                            退出

php.cn