TOUCH

Since 1.1.0Keys

Syntax

TOUCH key [key ...]
  • Flags: fast, readonly
  • ACL categories: @fast, @generic, @keyspace, @read
  • Arity: -2

Counts how many of the given keys exist. An expired key counts as missing.

Reply

  • The count.

Examples

> SET a 1
OK
> TOUCH a missing
(integer) 1