Memcached Basic Operation

Source: Internet
Author: User
Tags memcached ming

Essentially, memcached is a compact key-value storage system that maintains a huge hash table in memory. Each time the client accesses memcached, if the hit returns data directly, the query in the Plex database is returned to the client. Then update the memcached.

If the memcached is fully stored, the previous object memory is retired using the LRU policy.

Install under Ubuntu

sudo apt-get install memcached  

Connect to the Memcached service by using the Telnet command and specifying the host IP and port.

Telent 127.0.0.1 11211 (default port)

Common commands are only a few

Set Setting key is name, additional ID 0, save time is permanent, value length, value is Ming. If it already exists, it will be replaced.

Set name 0 0 4

Ming
STORED

Add adds new data and will not be updated if it has existed before

Replace replacement value

Append Append data to the back of the value

prepend Append data to the front of the value

get key1 key2 Key3 Gets the value corresponding to the key

Delete key1 key2 remove key-value pairs

Stats Statistical Information view

Memcached Basic Operation

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.