UK ['ki:z] US ['ki:z]

n.Key; key; (of music) key (plural noun of key); solution

redis KEYS command syntax

Function: Find all keys that match the given pattern pattern.

Syntax: KEYS pattern

Description: KEYS * Matches all keys in the database. KEYS h?llo matches hello , hallo and hxllo etc. KEYS h*llo matches hllo and heeeello etc. KEYS h[ae]llo matches hello and hallo , but not hillo . Special symbols are separated by \

Available version: >= 1.0.0

Time complexity: O(N), N is The number of keys in the database.

Returns: A list of keys that match the given pattern.

redis KEYS command example

redis> MSET one 1 two 2 three 3 four 4  # 一次设置 4 个 key
OK
redis> KEYS *o*
1) "four"
2) "two"
3) "one"
redis> KEYS t??
1) "two"
redis> KEYS t[w]*
1) "two"
redis> KEYS *  # 匹配数据库内所有 key
1) "four"
2) "three"
3) "two"
4) "one"