Introduction
DEL and UNLINK are commands to remove keys from Redis. They help clean up data you no longer need.
DEL key [key ...] UNLINK key [key ...]
DEL mykey
DEL key1 key2 key3
UNLINK mykey
UNLINK key1 key2
SET mykey "hello"
DEL mykey
EXISTS mykeyDEL and UNLINK commands in Redis?DEL behaviorDEL removes keys immediately and blocks Redis until deletion finishes.UNLINK behaviorUNLINK removes keys asynchronously in the background without blocking Redis.DEL deletes keys immediately and blocks Redis, while UNLINK deletes keys asynchronously in the background. -> Option ADEL [OK]key1 and key2 using the UNLINK command in Redis?UNLINK key1 key2 correctly deletes both keys at once.SET key1 "value1"SET key2 "value2"DEL key1UNLINK key2DEL key1DEL key1 deletes key1 immediately.UNLINK key2UNLINK key2 deletes key2 asynchronously, but it will be removed eventually.DEL key1 key2 but get an error. Which of the following is the most likely cause?DEL key1, key2 causes syntax error.DELDEL blocks Redis and deleting 1000 large keys at once can cause latency spikes.UNLINK in batchesUNLINK deletes keys asynchronously; batching avoids large memory spikes and keeps Redis responsive.Pass the test and this pattern moves unknown