M@
M@
Random eviction is fine for lazy caches but when your cache is read-intense, the objects are expensive to generate, and you end up evicting some hot items (and thus immediately...
Thanks for getting back to me. If a separate "New" function, ala "NewWithLRU" is used instead, there would be no API change. If that's sufficient, I'll update the pull, if...
If you're interested, I significantly changed how the LRU is handled. The janitor routine deals with everything asynchronously now, reducing list walks and whatnot, and significantly improving performance when the...
`.New()` has been reverted back to its previous 2-argument condition, `.NewWithLRU()` has been added with the 3-argument set. I also made some suggested README changes in a separate, subsequent commit....
@patrickmn I'll re-review my submissions (while I've used it a ton, I haven't looked at this code in an eon) fix the NewFrom, and see what I can come up...
@patrickmn New commit removes ctime, unbreaks NewFrom(), etc. I do not believe the extra empty "Atime" var adds any extra memory-per-cached-object for non-LRU caches. I cannot measure a difference, at...
Sent an invite to the repo. I can elevate you thereafter. @patrickmn
Looks good, @patrickmn . I'll get back on porting my LRU tests to plain go test. I've been made lazy with Convey :)
@patrickmn actually it looks like the LRU is broken, so don't merge. I haven't unwound the problem yet. I just saw you made some more commits. I haven't seen them...
In short, if you need a true LRU this isn't for you. For large (quantity) caches, it will purge "some of of the least-recently used items" but not necessarily **the**...