We need Cache.put()
--
guava-...@googlegroups.com
Project site: http://guava-libraries.googlecode.com
This group: http://groups.google.com/group/guava-discuss
This list is for general discussion.
To report an issue: http://code.google.com/p/guava-libraries/issues/entry
To get help: http://stackoverflow.com/questions/ask (use the tag "guava")
I just noticed that MapMaker's write functions (e.g. expireAfterWrite)
are deprecated and scheduled for removal in Guava 11. Contrary to what
the documentation says, you can't really use CacheBuilder as a
replacement because Cache.put() is missing (what's the point of
expireAfterWrite without it?).
I'd like to suggest pushing back deprecation of these methods until
one major version after Cache.put() is added.
I just noticed that MapMaker's write functions (e.g. expireAfterWrite)
are deprecated and scheduled for removal in Guava 11. Contrary to what
the documentation says, you can't really use CacheBuilder as a
replacement because Cache.put() is missing (what's the point of
expireAfterWrite without it?).
"writes" occur whenever new values are loaded into the cache from your CacheLoader.
We strongly believe that most of the time caches are more cleanly abstracted with no manual writes, only internal writes of values fetched from the CacheLoader. I'd love to better understand why so many people want manual writes so bad! We agree that there are times when they're necessary, but we'd like to believe manual writes unnecessary in many common cases.I'd like to suggest pushing back deprecation of these methods until
one major version after Cache.put() is added.
I think we should consider that, as well as consider adding support for Cache writes in the next point release. But again, please help us understand the use cases that are driving this panic!
Charles
As far as I can tell, there are no major problems with the MapMaker methods.
As far as I can tell, there is no reasonable replacement for the MapMaker methods.
I agree that it's responsible to encourage users to migrate as soon as possible, but currently the deprecation is doing nothing more than annoying me with IDE warnings (why are you using deprecated methods?!) and misleading users into believing that Cache can handle writes, when in fact it cannot.
If I could, I'd remove the deprecation on MapMaker and the existence of Cache.expireAfterWrite(). They are misleading until Cache.asMap().put() is added. Baring that, I'd extend deprecation by an extra release.
Yes, I agree this is an expiring map. And yes, genomes reappear in
the population so this is a matter of frequency/occurrences.
Gili
--
guava-...@googlegroups.com
Project site: http://guava-libraries.googlecode.com
This group: http://groups.google.com/group/guava-discuss
This list is for general discussion.
To report an issue: http://code.google.com/p/guava-libraries/issues/entry