[CCACHE-26] hit function in LRU cache can give funny results Created: 22/Aug/12 Updated: 22/Aug/12 |
|
| Status: | Open |
| Project: | core.cache |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Defect | Priority: | Major |
| Reporter: | Arthur Edelstein | Assignee: | Fogus |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Description |
|
A common-sense usage in caches is hit/get. But if I naively do this to an LRUCache, without checking first for the presence of the key, I can break the limit. (-> (cache/lru-cache-factory {} :threshold 2) ; {:e 5, :d 4, :c 3, :b 2, :a 1} |