SET

The Redis command that stores a value under a key, optionally with an expiry or only if the key does not exist.

In more detail

Writing the new value with SET during invalidation can race with another writer and leave an older value cached; deleting with DEL cannot lose that race. With its only-if-absent option, SET is also a conditional write.

Related terms

Taught in

References