refactor(redis): DEL -> UNLINK

This is beneficial since unlink is non blocking, it will run in a different thread if the data passed is large
https://redis.io/commands/unlink/

Signed-off-by: Akhil Narang <me@akhilnarang.dev>
This commit is contained in:
Akhil Narang 2024-02-01 13:30:45 +05:30
parent 886d4ffc25
commit 7c82115f5b
No known key found for this signature in database
GPG key ID: 9DCC61E211BF645F

View file

@ -144,7 +144,7 @@ class RedisWrapper(redis.Redis):
frappe.local.cache.pop(key, None)
try:
self.delete(*keys)
self.unlink(*keys)
except redis.exceptions.ConnectionError:
pass