CAS:compare and set [cas key oldval newval] CAD:compare and delete [cad key expectedval]

At present, redis is often used as the implementation carrier of distributed locks in distributed business systems. At present, the implementation basically depends on Lua scripts. Is it possible to implement these two commands natively?

This is just a simple personal consultation, No offense.

Comment From: taoseng

Found the relevant history, close.