SCAN cursor [MATCH pattern] [COUNT count]
SCANcommand and the closely related commands
ZSCANare used in order to incrementally iterate over a collection of elements.
SCAN用于迭代遍历当前被选中的（Selected） Redis 数据库中的键的集合。
ZSCAN用于迭代遍历指定有序集合类型（Sorted Set type）对象中的元素（Element）及关联的分值（Score）。
SCANiterates the set of keys in the currently selected Redis database.
SSCANiterates elements of Sets types.
HSCANiterates fields of Hash types and their associated values.
ZSCANiterates elements of Sorted Set types and their associated scores.
Since these commands allow for incremental iteration, returning only a small number of elements per call, they can be used in production without the downside of commands like
SMEMBERSthat may block the server for a long time (even several seconds) when called against big collections of keys or elements.
SMEMBERS 这样的阻塞命令时，能够提供一个集合在指定时刻的所有元素。SCAN 命令家庭只为返回的元素提供有限的此类保证，因为我们正在增量迭代遍历的一组元素可能在迭代过程中发生改变。
However while blocking commands like
SMEMBERSare able to provide all the elements that are part of a Set in a given moment, The
SCANfamily of commands only offer limited guarantees about the returned elements since the collection that we incrementally iterate can change during the iteration process.
Note that SCAN, SSCAN, HSCAN and ZSCAN all work very similarly, so this documentation covers all the four commands. However an obvious difference is that in the case of SSCAN, HSCAN and ZSCAN the first argument is the name of the key holding the Set, Hash or Sorted Set value. The SCAN command does not need any key name argument as it iterates keys in the current database, so the iterated object is the database itself.