[CCACHE-2] FIFOCache seed does not properly seed the FIFO queue Created: 30/Nov/11 Updated: 09/Dec/11 Resolved: 09/Dec/11 |
|
| Status: | Resolved |
| Project: | core.cache |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Defect | Priority: | Major |
| Reporter: | Fogus | Assignee: | Fogus |
| Resolution: | Completed | Votes: | 0 |
| Labels: | None | ||
| Description |
(def c (clojure.core.cache/seed (FIFOCache. {} nil 1) {:a 1 :b 2}))
(defmethod print-method clojure.lang.PersistentQueue [q, w]
(print-method '<- w)
(print-method (seq q) w)
(print-method '-< w))
(str c )
;=> "{:a 1, :b 2}, <-(:clojure.core.cache/free)-<"
(str (assoc c :c 3))
;=> "{:a 1, :c 3, :b 2}, <-(:c)-<"
The queue never gets the seed keys :a and :b and so they will never get expelled. |
| Comments |
| Comment by Fogus [ 09/Dec/11 6:46 AM ] |
|
Fixed in 7be1589095b48b7158584897a6b08c93322c3607 |