New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MapMaker to create a bounded cache (similar to LRU) #167
Comments
Original comment posted by cpovirk+external@google.com on 2009-05-13 at 06:15 PM This same issue has come up internally, and we're looking into it. Note that sometimes using soft references for keys/values is an option, since the GC Marking as "enhancement," as requested. Labels: |
Original comment posted by kevinb9n on 2009-09-17 at 05:52 PM Issue #236 has been merged into this issue. CC: crazyboblee |
Original comment posted by kevinb9n on 2009-09-17 at 05:53 PM (No comment entered for this change.) |
Original comment posted by kevinb9n on 2009-09-17 at 05:53 PM (No comment entered for this change.) Labels: |
Original comment posted by yrfselrahc on 2009-09-18 at 12:26 PM Issue #236 has been merged into this issue. |
Original comment posted by frederic.simon on 2009-09-22 at 12:04 PM I agree with the need of a 2-level cache: Hard ref LRU/MRU bounded, then the rest on |
Original comment posted by yrfselrahc on 2009-09-22 at 01:53 PM Actually soft references are collected in an LRU fashion (per their Javadoc), so it sounds like you can already get |
Original comment posted by frederic.simon on 2009-09-22 at 06:02 PM It's true, but I found 2 issues with a full soft references cache system:
BTW: I use MapMaker with SoftReference for all caches + EhCache for hard ref on the I'll really preferred a All-in-one solution. |
Original comment posted by ian.clarke on 2010-01-29 at 12:12 AM There is an additional problem with using SoftReferences as a cache, which is that I've |
Original comment posted by kevinb@google.com on 2010-07-30 at 03:53 AM (No comment entered for this change.) Labels: - |
Original comment posted by yrfselrahc on 2011-01-13 at 07:58 PM See the new maximumSize method. Status: |
Original comment posted by plinehan on 2011-01-13 at 09:21 PM Fantastic! Can we assume this will be in Milestone:Release08? |
Original issue created by kevin.a.conaway on 2009-05-13 at 06:04 PM
This is not a defect but the "template" options did not have any way to
report an enhancement request.
It would be nice if the MapMaker had additional ways to expire entries
other than a time duration. Specifically, LRU/MRU would be very useful if
I want to use the Map as a cache but only for a limited number of entries.
The text was updated successfully, but these errors were encountered: