Explore tens of thousands of sets crafted by our community.
Redis Data Types
5
Flashcards
0/5
Set
An unordered collection of strings that are unique. Common commands include SADD to add, SREM to remove, and SMEMBERS to get all members of the set.
String
The most basic type of Redis data. It can store any kind of data, from alphanumeric characters to binary. Command to set a string: SET key value, to get a string: GET key.
Sorted Set
Like regular sets, but every member has an associated score, which is used to order them. ZADD to add members, ZRANGE to get a range by index, and ZRANGEBYSCORE to get a range by score.
Hash
Represents a dictionary composed of field-value pairs. It's suitable for storing objects. HSET to set a field, HGET to retrieve a value, HMGET to get multiple values, and HGETALL to get all the field-value pairs.
List
Ordered collection of strings. Often used as a queue. Commands to manipulate lists include LPUSH/RPUSH to insert, LPOP/RPOP to remove items, and LRANGE to retrieve a range of elements.
© Hypatia.Tech. 2024 All rights reserved.