Memcached Set Operation with Python Example

RSS
EMAIL
FACEBOOK
FACEBOOK
GOOGLE
GOOGLE
https://www.poftut.com/memcached-set-operation-python-example/
PINTEREST
PINTEREST
INSTAGRAM

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

RSS
EMAIL
FACEBOOK
FACEBOOK
GOOGLE
GOOGLE
https://www.poftut.com/memcached-set-operation-python-example/
PINTEREST
PINTEREST
INSTAGRAM

LEARN MORE  How To Get Today's Date?

Leave a Reply

Your email address will not be published.