Memcached Set Operation with Python Example – POFTUT

Memcached Set Operation with Python Example

Set is most used command in Memcached. Its store data. If the data exists it will be over written. New data is always added at the top of the LRU. LRU means Last Recently Used.  Syntax of the set is like below.

Now we will add and url  with set operation.

  • set is the operation
  • poftut is the key to find data
  • is the flag so there is no flag
  • 1000 is the seconds to hold value in Memcached. After that value is deleted
  • is the size of the value
  • test is the value we want to save
  • STORE means it is saved successfully

Let’s check the value we have saved. Keep in mind that we have 1000 seconds to check after that time the value will not exists.

Python Application

LEARN MORE  What Is Shebang Linux or Bash Term?

Leave a Reply

Your email address will not be published. Required fields are marked *

Enjoy this blog? Please spread the word :)