Which Redis configuration setting controls the interval (in seconds) for saving RDB snapshots?
rdb_snapshot_time
snapshot_frequency
save_interval
rdb_save_seconds
How would you add an element 'apple' to a set named 'fruits' in Redis?
LPUSH fruits apple
HSET fruits apple
SET fruits apple
SADD fruits apple
What file extension is typically used for Redis's Append-Only File?
.aof
.log
.rdb
.redis
Which Python package is commonly used to interact with a Redis database?
python-redis
redisdb
pyredis
redis-py
Which command is used to remove a field from a hash in Redis?
DEL
SREM
HGET
HDEL
Which AOF configuration option tells Redis to rewrite the AOF file periodically to reduce its size?
aof_optimize
aof_compact_size
aof_rewrite_threshold
aof_rewrite_frequency
How can you delete a key named 'mykey' from Redis using redis-py?
r.clear('mykey')
r.delete('mykey')
r.remove('mykey')
r.erase('mykey')
What is a potential drawback of using only RDB snapshots for persistence in Redis?
Potential data loss between snapshots
Slow write speeds
Complex configuration
High memory usage
How do you establish a connection to a Redis server using redis-py?
redis.Redis()
Redis.create_connection()
redis.connect()
Redis.new()
How do you set a key to expire after 20 seconds in Redis?
TIMEOUT key 20
PERSIST key 20
SETEX key 20 value
EXPIRE key 20