{"acl_categories":["@keyspace","@read","@fast"],"arguments":[{"display_text":"key","key_spec_index":0,"multiple":true,"name":"key","type":"key"}],"arity":-2,"categories":["docs","develop","stack","oss","rs","rc","oss","kubernetes","clients"],"command_flags":["readonly","fast"],"complexity":"O(N) where N is the number of keys that will be touched.","description":"Returns the number of existing keys out of those specified after updating the time they were last accessed.","duplicateOf":"head:data-ai-metadata","group":"generic","key_specs":[{"RO":true,"begin_search":{"spec":{"index":1},"type":"index"},"find_keys":{"spec":{"keystep":1,"lastkey":-1,"limit":0},"type":"range"}}],"location":"body","since":"3.2.1","syntax_fmt":"TOUCH key [key ...]","title":"TOUCH","tableOfContents":{"sections":[{"id":"examples","title":"Examples"},{"id":"redis-software-and-redis-cloud-compatibility","title":"Redis Software and Redis Cloud compatibility"},{"id":"return-information","title":"Return information"}]},"codeExamples":[]}
touch(
keys: byte[]...
) → long// The number of keys that were touched.touch(
key: byte[]
) → long// The number of keys that were touched.touch(
keys: String...
) → long// The number of keys that were touched.touch(
key: String
) → long// The number of keys that were touched.
touch(
keys: K...// the keys.
) → Long// Long integer-reply the number of found keys.
touch(
keys: K...// the keys.
) → RedisFuture<Long>// Long integer-reply the number of found keys.
touch(
keys: K...// the keys.
) → Mono<Long>// Long integer-reply the number of found keys.
KeyTouch(
key: RedisKey, // The key to touch.flags: CommandFlags// The flags to use for this operation.
) → bool// true if the key was touched, false otherwise.KeyTouch(
keys: RedisKey[], // The keys to touch.flags: CommandFlags// The flags to use for this operation.
) → long// The number of keys that were touched.
KeyTouchAsync(
key: RedisKey, // The key to touch.flags: CommandFlags// The flags to use for this operation.
) → Task<bool>// true if the key was touched, false otherwise.KeyTouchAsync(
keys: RedisKey[], // The keys to touch.flags: CommandFlags// The flags to use for this operation.
) → Task<long>// The number of keys that were touched.
touch(
$keyOrKeys: string[]|string,
$keys: string ...
) → int
No method signature available for this client.
No method signature available for this client.
Available since:
Redis Open Source 3.2.1
Time complexity:
O(N) where N is the number of keys that will be touched.