4, (1) Telnet operation memcached
Many languages implement a client that connects Memcached, with Perl and PHP as the main. Only the languages listed on the memcached website are: perl php python Ruby C# c/c++
In order to let everyone quickly experience the use of memcached, we first through a ready-made program telnet to illustrate the use of memcached, and then we explain how to operate through the PHP program memcached, please pay attention to experience its usage. Use the Telnet program ( Client) crud the memcached!, here we need to use the command we gave to Memcached.
Run cmd-telnet without this command, put Telnet.exe in the C:\Windows\System32 folder
Open cmd-"Telnet 172.22.63.20 11211-" can be cut in in order to perform data operation
①, telnet add data to memcached:
Add key value 0 time (seconds) length (how long to store the time specified by you, the key name cannot be repeated, but the value can be repeated
) Example: Add name 0 5 5 cannot be in Add name 0 77 44
②, getting data
Get key value "Key-val key cannot be duplicated, but Val can repeat"
③, modifying data
Replace key value 0 60 5 "Failed if key value does not exist"
Set key value 0 60 5 "If the key value does not exist, it is equivalent to adding, if present, the equivalent of a modification."
④, deleting data
Delete key value
Cases:
How does telnet operate the memcached cache system?