The underlying data structure of the data type is SDS?

Each Redis object is a redisObject. Each Redis object is a redisObject. The attributes of the object are type, encoding, * PTR pointer to the underlying data structure. Refcount Specifies the reference count. Lru records the time when the program was last accessed

The type attribute of an object records the type of the object, which is the five data types mentioned above. In Redis, the key is always a string object, while the value can be a string, list, collection and other objects. The PRT pointer to the object points to the underlying data structure, which is determined by the Encoding property, and the refcount reference count is used as a memory reclamation mechanism: Create a new object, the refCount is initialized to 1, the object is used by a new program, the refCount is increased by 1, the object is no longer used by a program, the refcount is decreased by 1, and the memory occupied by the object is freed when the object’s reference count becomes 0.

Strings are the most basic data type of Redis. All keys are strings, and the string length cannot exceed 512 MB.

Encoding: The encoding of a string object can be int, RAW, or embstr. The int encoding is used to hold integer values, the RAW encoding is used to hold strings longer than 44 bytes, and the embstr encoding is used to hold strings shorter than 44 bytes. Embstr is an optimized encoding for storing short strings. Both EMBSTR and RAW use redisObject and SDS to store data. The difference is that THE use of EMBSTR allocates memory space only once (so redisObject and SDS are continuous), while r