After upgrading to Clojure 1.7 beta2 some of our code started failing, specifically attempts to use iterator() on (keys our-cache).
This is because post http://dev.clojure.org/jira/browse/CLJ-1499, calls to iterator on Seqables optimize by delegating to underlying collection iterator. defcache implements IPersistentMap but not iterator therefore:
Proposal: Make defcache implement Iterable (which is implied by implementing IPersistentMap). I implemented by invoking .iterator on the underlying base-field, however this brings up the issue of reflection (warnings then popped up). To fix, I applied meta to base-field to type-hint it to clojure.lang.IPersistentMap.
This seems implied by various checks for map? elsewhere but I am not certain this is the correct type hint. It could be as narrow as java.lang.Iterable to be sufficient, but it seemed better to make a broader statement here if that is correct.