Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
clojure client to kestrel via the spymemcached client
Clojure
tree: b3d9dc3162

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
src/kestrel
target/stale
test/kestrel/test
.gitignore
README.md
project.clj

README.md

kestrel-client

Wrapper for spymemcached to access kestrel as a memcached client

Usage

(:require [kestrel.client :as kestrel])

;;create client 
(kestrel/default-client) ;; use default settings
(def kestrel2 (kestrel/default-client :host "127.0.0.1" :port 22133)) 

;;get version of current Kestrel 
(kestrel/get-version)

;;add and get values from Kestrel
(kestrel/set-item "uris" "http://httpbin.org/ip")
(kestrel/set-item "uris" "http://httpbin.org/delay/10")

(kestrel/get-item "uris")
(nil? (kestrel/get-item "uris")) ;; should be false
(kestrel/get-item "uris") ;; should be nil 

;;flush queue 
(kestrel/flush-queue "uris")
(kestrel/flush-all) ;its nice to start working on clean sheet

;;get stat 

(kestrel/get-stats)

License

Copyright (C) 2011 Adam Wynne (@AdamJWynne on twitter)

Distributed under the Eclipse Public License, the same as Clojure.

Something went wrong with that request. Please try again.