Greetings,
I am trying to improve the "Cache Aside" policy of our application. The idea is to use "WATCH" and "MULTI/EXEC" commands. But I face that the "DEL" command on the non-existing key does not cancel the transaction. It is clear that the DEL command works according to the documentation. However, I will try to prove that it may be useful to support the following scenario:
The "Read" operation:
t1. GET key // cache miss.
t2. WATCH key // start monitoring the key for concurrent updates.
t5. fetch "OLD_VALUE" from the DB.
t6. MULTI
t7. SETNX key OLD_VALUE
t8. EXEC
Meanwhile, The "Save" operation is updating the value in DB and clears the cache after we executed WATCH (t2) and before we executed EXEC (t8):
t3. save "NEW_VALUE" to the DB
t4. DEL key.
So, in this case, it would be very useful if the DEL command could affect the behavior of the transaction and make it fail. Let's discuss? What is the proper way to submit feature request?
Thank you!