Commit c9562b7d authored by Rajko Albrecht's avatar Rajko Albrecht

Don't start watch if key does not exist

parent 211d8eae
......@@ -4,8 +4,8 @@ class Redis
module Cas
def cas key, ttl=nil
return false unless exists(key)
watch(key) do
break false unless exists(key)
value = get(key)
value = yield value
ires = multi do |multi|
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment