(destroy rd ns k)
Deletes the key-value pair for the given ns/key. Just returns 0 if the key does not exist.
Deletes the key-value pair for the given ns/key. Just returns 0 if the key does not exist.
(fetch rd ns k)
Returns the single value at an ns and key using redis's GET.
Returns the single value at an ns and key using redis's GET.
(swap-in rd ns key f)
Calls f on the value for key in a namespace and swaps the result in as the new value. Uses redis's WATCH command so that the transaction fails if another write on the key is detected. Transaction failures are indicated by a nil returned from exec (after with-replying and parsing).
Calls f on the value for key in a namespace and swaps the result in as the new value. Uses redis's WATCH command so that the transaction fails if another write on the key is detected. Transaction failures are indicated by a nil returned from exec (after with-replying and parsing).
(write rd ns key value)
Writes a value to a key without the optimistic locking semantics used in swap-in
.
Internally only calls SET.
Writes a value to a key without the optimistic locking semantics used in `swap-in`. Internally only calls SET.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close