Permalink
Browse files

Shuffling fns around

  • Loading branch information...
1 parent 995ba55 commit 55183b4c778dcd5b68c8caee0195f126420aac65 @fogus fogus committed Jun 15, 2012
Showing with 6 additions and 8 deletions.
  1. +6 −8 src/main/clojure/clojure/core/cache.clj
@@ -225,7 +225,12 @@
(toString [_]
(str cache \, \space lru \, \space tick \, \space limit)))
-(declare key-killer)
+
+(defn- key-killer
+ [ttl limit now]
+ (let [ks (map key (filter #(> (- now (val %)) limit) ttl))]
+ #(apply dissoc % ks)))
+
(defcache TTLCache [cache ttl ttl-ms]
CacheProtocol
@@ -259,13 +264,6 @@
(str cache \, \space ttl \, \space ttl-ms)))
-(defn- key-killer
- [ttl limit now]
- (let [ks (map key (filter #(> (- now (val %)) limit)
- ttl))]
- #(apply dissoc % ks)))
-
-
(defcache LUCache [cache lu limit]
CacheProtocol
(lookup [_ item]

0 comments on commit 55183b4

Please sign in to comment.