TOUCH

Syntax
TOUCH key [key ...]
Available since:
3.2.1
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

redis> SET key1 "Hello"
Failed to fetch
redis> SET key2 "World"
Failed to fetch
redis> TOUCH key1 key2
Failed to fetch
redis>

Feedback

If you've found issues on this page, or have suggestions for improvement, please submit a request to merge or open an issue in the repository.