Redis easy
Which basic Redis command is used to store or update a simple String value associated with a specific key?
- A INSERT: Commits a new record into the global data partition index.
- B PUT: Standardizes the replacement of an existing object in memory.
- C SET: Assigns the specified string value to the identified key.
- D ADD: Appends the string to an existing value if the key already exists.
Answer: C. SET: Assigns the specified string value to the identified key.
`SET` and `GET` are the most fundamental commands. `SET` overwrites the current value and resets any associated TTL by default, making it the primary tool for basic state management.
One system design question a day, with spaced repetition so the ones you miss come back.
Get the appRelated questions
- If the Redis memory limit is reached, what specific behavior is exhibited by the `allkeys-lru` eviction policy?
- What is the defining characteristic of a Redis 'Set' data type compared to a standard Redis 'List'?
- In the context of Redis messaging, what is the functional definition of the 'Pub/Sub' feature?
- How does the Redis background snapshotting process (`BGSAVE`) leverage the operating system's `fork()` mechanism to minimize memory overhead?
- Why does Redis proactively disconnect a Pub/Sub client that exhibits high 'output buffer' usage relative to its ingestion rate?
- How does a 'Sorted Set' (ZSET) manage its internal membership and ordering differently from a plain Set?