Redis Flashcards

(20 cards)

1
Q

What type of database is Redis?

A

Redis is an in-memory key-value store.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

True or False: Redis supports data persistence.

A

True.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Fill in the blank: Redis uses _____ to store data in memory.

A

data structures.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Which of the following is NOT a data type supported by Redis? a) String b) List c) Object d) Set

A

c) Object.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What command would you use to add an element to a Redis list?

A

LPUSH.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Short Answer: Name one common design pattern used with Redis.

A

Caching.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Which persistence option saves snapshots of your dataset in Redis?

A

RDB (Redis Database Backup).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

True or False: Redis can be used for pub/sub messaging.

A

True.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is the maximum size of a Redis string value?

A

512 MB.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Fill in the blank: Redis supports _____ replication for high availability.

A

master-slave.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

[REDIS] Stel een string waarde in voor een key

A

SET mykey “Hello World”

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

[REDIS] Haal de waarde op van een key

A

GET mykey

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

[REDIS] Verwijder 1 of meer keys

A

DEL mykey
DEL key1 key2 key3

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

[REDIS] Controleer of een key bestaat

A

EXISTS mykey

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

[REDIS] Stelt een vervaltijd in van een key

A

EXPIRE mykey 3600

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

[REDIS] Toon resterende tijd tot een vervaldatum van een key

17
Q

[REDIS] Zoek keys die overheen komen met een patroon

A

KEYS *
KEYS user: *

18
Q

[REDIS] Verwijder alle keys uit alle databases

19
Q

[REDIS] Test de verbinding met de Redis server

20
Q

[REDIS] Toon informatie en statistieken over de Redis-server

A

INFO
INFO memory