Redis Commands and Data Structures Cheat Sheet

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
full-widthPodcast
1
Card Sorting

1/15

flashcard set

Earn XP

Description and Tags

Vocabulary flashcards covering core Redis commands, data structures (strings, sets, lists, hashes, sorted sets), and options based on the Redis cheat sheet.

16 Terms

1
New cards

FLUSHDB

Deletes all keys from the entire Redis instance.

2
New cards

GETRANGE

Retrieves a substring of a stored value with inclusive indices, supporting negative indices to count from the end.

3
New cards

SCARD

Returns the number of elements (cardinality) present in a set.

4
New cards

SPOP

Removes and returns a random element from a set.

5
New cards

SRANDMEMBER

Returns a random element from a set without removing it.

6
New cards

SDIFFSTORE

Computes the set difference between sets and stores the resulting elements in a specified new key.

7
New cards

SINTER

Performs a set intersection operation between two sets.

8
New cards

LTRIM

Crops a list so that it only retains the specified sublist of values between two indices.

9
New cards

LREM

Removes a specified number of matching occurrences of a value from a list.

10
New cards

HGETALL

Retrieves all keys and their corresponding values from a hash in one alternating list.

11
New cards

Sorted Set

A set whose members have numeric scores, where rank 00 defaults to the member with the lowest score and rank n−1n-1 corresponds to the member with the highest score.

12
New cards

REV

Letters added directly after the Z in sorted set range commands to reverse the ranking order, assigning rank 00 to the item with the highest score.

13
New cards

ZADD

Adds an element to a sorted set with a numeric score, placing the score parameter before the element name.

14
New cards

ZRANK

Returns the rank of an element in a sorted set, measured starting from the lowest score at 00.

15
New cards

ZCOUNT

Returns the number of elements in a sorted set that have scores within a specified minimum and maximum range.

16
New cards

WITHSCORES

An optional argument supplied to sorted set range queries to retrieve both the member elements and their associated scores.