[CCACHE-21] LRU and LU caches never evict entries that came in as a seed and are never accessed Created: 14/Mar/12 Updated: 14/Mar/12 Resolved: 14/Mar/12 |
|
| 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: | bug, cache, lru, lu | ||
| Description |
|
If one initializes an LRU or LU cache with seed data and those datum are never touched, then they are never evicted. (def C (lru-cache-factory {:a 1, :b 2} :limit 2))
(-> C (assoc :c 3) (assoc :d 4) (assoc :e 5))
You would expect that the cache should contain only :d and :e, but it instead includes :a, :b, :d and :e! The problem is that seeds are never added to the eviction queue. |
| Comments |
| Comment by Fogus [ 14/Mar/12 8:15 AM ] |
|
Fixed in 5751b7e8d8d2f10c87b8a79c8ed9b0324368514d |
[CCACHE-10] Add eviction implementation to LUCache Created: 08/Dec/11 Updated: 12/Dec/11 Resolved: 12/Dec/11 |
|
| Status: | Resolved |
| Project: | core.cache |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Task | Priority: | Major |
| Reporter: | Fogus | Assignee: | Fogus |
| Resolution: | Completed | Votes: | 0 |
| Labels: | associative, cache, evict, lu | ||
| Description |
|
The evict method in the ProtocolCache needs implementation for LUCache. I will start initially with a single key eviction method to start. The evict method would form the basis for the associative dissoc which in turn forms the basis for proper limited seeding. Currently only the BasicCache impl has evict. |
| Comments |
| Comment by Fogus [ 12/Dec/11 7:54 AM ] |
|
Implemented in ca4587bdbdca2728b191bf98472a778231250e61. |