Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

created repo

  • Loading branch information...
commit b24e7b1f9f5c95bda760e3be7919f66292fb0d5e 0 parents
@wallrat authored
Showing with 61 additions and 0 deletions.
  1. +61 −0 README
61 README
@@ -0,0 +1,61 @@
+# labs-redis2
+
+This is Clojure client lib for [Redis](https://github.com/antirez/redis)
+
+- fast (frugal)
+- pipeline by default
+- @
+- @@
+- idiomatic
+- more than one redis server
+- pub/sub INC unsub
+- multi/exec
+- eval
+- up-to-date, commands.json
+
+## Basic Usage
+
+```clojure
+(require '[labs-redis2.core :as redis])
+
+(def db (redis/client))
+
+(redis/ping db)
+=> <ReplyFuture <StatusReply "PONG">>
+
+@(redis/ping db)
+=> <StatusReply "PONG">
+
+(redis/value @(redis/ping db))
+=> "PONG"
+
+@@(redis/ping db)
+=> "PONG"
+
+@(redis/set db "foo" "bar")
+=> <StatusReply "OK">
+
+@(redis/get db "foo")
+=> <BulkReply@xxxx: #<byte[] [B@xxxx]>>
+
+@@(redis/get db "foo")
+=> #<byte[] [B@xxxx]>
+
+(String. @@(redis/get db "foo"))
+=> "bar"
+
+(redis/->str @(redis/get db "foo"))
+=> "bar"
+```
+
+## Installation / Leiningen
+
+Add `[labs-redis "0.1.1"] in your `project.clj`.
+then run lein deps.
+
+
+## License
+
+Copyright © 2012 Andreas Bielk
+
+Distributed under the MIT/X11 license; see the file LICENSE.
Please sign in to comment.
Something went wrong with that request. Please try again.