Skip to content

Instantly share code, notes, and snippets.

@ejackson ejackson/redis.clj
Created Apr 1, 2011

What would you like to do?
(declare *connection*)
(defmacro with-redis
([host func]
`(binding [*connection* (Jedis. ~host)]
(.disconnect *connection*))))))
(defmacro redis* [host name & args]
(. *connection* ~name ~@args)))
(defmacro create-redis [host]
`(defmacro redis [n# & args#]
`(redis* ~~host ~n# ~@args#)))
(redis keys "*")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.