TOUCH key [key …]

Available since 3.2.1.

Time complexity: O(N) where N is the number of keys that will be touched.

Alters the last access time of a key(s). A key is ignored if it does not exist.

*Return value

Integer reply: The number of keys that were touched.

*Examples

redis> SET key1 "Hello"

  1. "OK"

redis> SET key2 "World"

  1. "OK"

redis> TOUCH key1 key2

  1. (integer) 2
redis>