Redis Combat Summary:
About Redis
Five types of data for Redis:
2.1 String Type
The string type is a special type that contains many types, and is binary safe.
For example, a serialized object is stored, for example, a picture is stored in binary format,
such as a simple string, numeric value and so on.
Set and Get methods:
Set Value: set name Yucong take value get name (description set name multiple times overwrite)
Delete value: del name
Use SetNX (notexist) name if no settings exist, there is no need to set up, return 0,
Using Setex(expired)
Setex name ten Red set name is valid for 10s,10s and returns nil (nil in redis means null)
Replacing strings with SetRange
Set email [email protected]
SetRange Email 5 ww (5 means to replace from the first, followed by the replacement string)
2.2 Hash Type
2.3 List Type
2.4 Set Data type
Redis Combat _01_yucong_redis Basics