TOUCH

Syntax

  1. TOUCH key [key ...]

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

ACL categories: @keyspace, @read, @fast

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

Return

Integer reply: The number of keys that were touched.

Examples

  1. dragonfly> SET key1 "Hello"
  2. "OK"
  3. dragonfly> SET key2 "World"
  4. "OK"
  5. dragonfly> TOUCH key1 key2
  6. (integer) 2