Telnet 127.0.0.1 11211 Connection memcached
Memcached-tool 127.0.0.1:11211 display shows how many page memcached are saved.
memcached Syntax
<command name> <key> <flags><exptime><bytes>\r\n <data block> \ r \ n
\ r \ n indicates enter
<command> has:
set means that the data is stored according to the corresponding <key>, and when there is no time to increase, some words will be overwritten.
Add means that the data is added according to the appropriate <key>, and if the <key> exists, the operation fails.
Replace means that the data is replaced by the corresponding <key>, and if the <key> does not exist, the operation fails.
<key> represents the value that the client needs to hold the data.
<flags> is a 16-bit unsigned (decimal) integer tag. The tag is stored with the data that needs to be stored and returned when the client get data. Customers can use this tag for special purposes, which is opaque to the server.
<exptime> Indicates the expiration time of this data, if 0 means never expires (but can be replaced by server algorithm: LRU, etc.). If it is not 0 (server time is standard), the server deletes this data directly when it expires.
<bytes> represents the number of bytes that need to be stored <bytes> can be 0 when the user wants to store empty data.
<data Block> represents the content that needs to be stored, after the input is completed, you need to add "\ r \ n" to the end flag.
Instance:
650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M02/82/9D/wKioL1ddAM2CB8jjAADCtuHritM094.png "title=" Image.png "alt=" Wkiol1ddam2cb8jjaadctuhritm094.png "/>
Memcached Basic Operation