Answer the question
In order to leave comments, you need to log in
What is the purpose of the TOUCH command in redis?
The command TOUCH is written in the dock Changes the time of the last access to the key.
What is it for? Can you give examples plz
Answer the question
In order to leave comments, you need to log in
radish considers "easy" to write: how much time has passed since the last access (read or write).
the touch command resets this counter to zero.
how to use it depends only on your imagination.
for example, I'm deleting some post types that haven't been accessed for more than a certain amount of time. using touch allows me to "update" such entries without accessing them directly.
Explanation on SO
The TOUCH command can be used to extend the life of a record
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question