2 ;; Simple demo of redis-clojure functionality
4 ;; Make sure redis-clojure.jar or the contents of the src/ directory
5 ;; is on the classpath.
8 ;; (add-classpath "file:///path/to/redis-clojure.jar"
10 ;; (add-classpath "file:///path/to/redis/src-dir/")
13 (add-classpath "file:///Users/ragge/Projects/clojure/redis-clojure/redis-clojure.jar")
20 {:host "127.0.0.1" :port 6379 :db 0}
22 (println "Sending ping")
23 (println "Reply:" (redis/ping))
24 (println "Server info:")
25 (let [info (redis/info)]
28 (println (str "- "(first entry) ": " (last entry)))) info)))
29 (println "Setting key 'foo' to 'bar'")
30 (println "Reply:" (redis/set "foo" "bar"))
31 (println "Getting value of key 'foo'")
32 (println "Reply:" (redis/get "foo"))))