[CCACHE-5] Implement SoftCache Created: 06/Dec/11 Updated: 13/Jul/12 Resolved: 19/Jun/12 |
|
| Status: | Resolved |
| Project: | core.cache |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Task | Priority: | Major |
| Reporter: | Fogus | Assignee: | Unassigned |
| Resolution: | Completed | Votes: | 0 |
| Labels: | None | ||
| Attachments: |
|
| Description |
|
Clache had a buggy implementation of a cache backed by soft references. This capability should be explored further and implemented properly for core.cache. |
| Comments |
| Comment by Paul Stadig [ 04/Jun/12 10:20 AM ] |
|
I'd be interested in taking a crack at this, but would find it useful to have more infos about what bugs existed in the Clache implementation. |
| Comment by Paul Stadig [ 16/Jun/12 8:14 AM ] |
|
I've implemented a mutable SoftCache. I felt as though the tradeoffs made it worth using a ConcurrentHashMap as the base for SoftCache. SoftReference objects are mutable (and tied to a specific instance of ReferenceQueue). ReferenceQueue is mutable. Using an immutable map as the base for SoftCache would cost {O(n)} when removing cleared SoftReference objects from the cache. |
| Comment by Fogus [ 19/Jun/12 6:53 AM ] |
|
I have no problem with internal mutability in the cache impls, so that immutable code might not be needed. I've pushed the 0.7.0-SNAPSHOT version with your additions and will run it through the paces post-haste. Thank you for tackling this Paul, it's a huge help. |
| Comment by Fogus [ 19/Jun/12 6:54 AM ] |
|
Planned for v0.7.0 |
| Comment by Fogus [ 13/Jul/12 10:47 AM ] |
|
Actually released in version 0.6.1. |