TOUCH
Syntax
TOUCH key [key ...]
- Available since:
- Redis Open Source 3.2.1
- Time complexity:
- O(N) where N is the number of keys that will be touched.
- ACL categories:
-
@keyspace,@read,@fast, - Compatibility:
- Redis Enterprise and Redis Cloud compatibility
Alters the last access time of a key(s). A key is ignored if it does not exist.
Examples
Redis Enterprise and Redis Cloud compatibility
| Redis Enterprise |
Redis Cloud |
Notes |
|---|---|---|
| ✅ Standard |
✅ Standard |
Return information
Integer reply: the number of touched keys.