Skip to content

Commit

Permalink
replace existing ehcache blocking-caches to prevent error on file reload
Browse files Browse the repository at this point in the history
  • Loading branch information
bmabey committed May 12, 2011
1 parent 6de7c13 commit c331102
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ehcache/src/cache_dot_clj/ehcache.clj
Expand Up @@ -108,11 +108,11 @@
(add-cache manager config cache-name)))

(defn-with-manager create-blocking-cache
"Returns an ehcache Cache object with the given name and config."
"Returns the registered blocking-cache, creating and adding a new one if needed."
[cache-name config]
(let [^Ehcache cache (create-cache manager cache-name config)
^Ehcache blocking-cache (BlockingCache. cache)]
(.replaceCacheWithDecoratedCache manager cache blocking-cache)
^Ehcache blocking-cache (BlockingCache. cache)]
(.addDecoratedCacheIfAbsent manager blocking-cache)
blocking-cache))

;; By default the key (args of the fn) would be a clojure.lang.ArraySeq, and for some reason
Expand Down

0 comments on commit c331102

Please sign in to comment.