Skip to content

adamwynne/kestrel-client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

clojure client to kestrel via the spymemcached client

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •