A more efficient implementation of clojure.core.cache/has? for BasicMongerCache

This commit is contained in:
Michael S. Klishin 2012-04-12 17:12:08 +04:00
parent 90c2864ddd
commit ceeac55496

View file

@ -28,7 +28,7 @@
(:value doc)
not-found))
(has? [c k]
(mc/any? (get c :collection) {:_id k}))
(not (nil? (mc/find-by-id (get c :collection) k))))
(hit [this k]
this)
(miss [c k v]