Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

clojure client to kestrel via the spymemcached client

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 src
Octocat-spinner-32 target
Octocat-spinner-32 test
Octocat-spinner-32 .gitignore
Octocat-spinner-32 README.md
Octocat-spinner-32 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.