1/15
Vocabulary flashcards covering core Redis commands, data structures (strings, sets, lists, hashes, sorted sets), and options based on the Redis cheat sheet.
FLUSHDB
Deletes all keys from the entire Redis instance.
GETRANGE
Retrieves a substring of a stored value with inclusive indices, supporting negative indices to count from the end.
SCARD
Returns the number of elements (cardinality) present in a set.
SPOP
Removes and returns a random element from a set.
SRANDMEMBER
Returns a random element from a set without removing it.
SDIFFSTORE
Computes the set difference between sets and stores the resulting elements in a specified new key.
SINTER
Performs a set intersection operation between two sets.
LTRIM
Crops a list so that it only retains the specified sublist of values between two indices.
LREM
Removes a specified number of matching occurrences of a value from a list.
HGETALL
Retrieves all keys and their corresponding values from a hash in one alternating list.
Sorted Set
A set whose members have numeric scores, where rank 0 defaults to the member with the lowest score and rank n−1 corresponds to the member with the highest score.
REV
Letters added directly after the Z in sorted set range commands to reverse the ranking order, assigning rank 0 to the item with the highest score.
ZADD
Adds an element to a sorted set with a numeric score, placing the score parameter before the element name.
ZRANK
Returns the rank of an element in a sorted set, measured starting from the lowest score at 0.
ZCOUNT
Returns the number of elements in a sorted set that have scores within a specified minimum and maximum range.
WITHSCORES
An optional argument supplied to sorted set range queries to retrieve both the member elements and their associated scores.