英[dʌmp] 美[dʌmp]

vt. Dump; dump; drop, unload; get rid of, throw away

vi.Suddenly fall or drop; unload; transfer ( Responsibility, etc.)

n. Garbage dump; warehouse; disorderly accumulation

Third person singular: dumps Present participle: dumping Past tense: dumped Past participle: dumped

redis DUMP command syntax

Function:Serialize the given key and return the serialized value. Use the RESTORE command to deserialize this value into a Redis key.

Syntax: DUMP key

Description: The value generated by serialization has the following characteristics: It has a 64-bit checksum , used to detect errors, RESTORE checks the checksum before deserializing. The encoding format of the value is consistent with the RDB file. The RDB version will be encoded in the serialized value. If the RDB format is incompatible due to different versions of Redis, Redis will refuse to deserialize the value. Serialized values ​​do not include any time-to-live information.

Available versions: >= 2.6.0

Time complexity: The complexity of finding a given key is O(1), The complexity of serializing a key is O(N*M), where N is the number of Redis objects that make up the key, and M is the average size of these objects. If the serialized object is a relatively small string, the complexity is O(1).

Return: If key does not exist, then return nil. Otherwise, the serialized value is returned.

redis DUMP command example

redis> SET greeting "hello, dumping world!"
OK
redis> DUMP greeting
"\x00\x15hello, dumping world!\x06\x00E\xa0Z\x82\xd8r\xc1\xde"
redis> DUMP not-exists-key
(nil)