Ben Manes

Results 420 comments of Ben Manes

What do you mean by `inconsistency of getIfPresent() under heavily multi-threaded`? One would expect entries to expire with some threads seeing it and some not. In both libraries the use...

This plays poorly with other dependencies and, since Gradle 4 changed the classpath ordering, I see breaks depending on the OS being run on. This is being used by jtwig...

~It seems my rule might need to follow this description (from Google'ing)~ > ~If the Fourth of July falls on a Sunday, the federal observed holiday is the following Monday,...

A few years back, I looked into Linux's page cache, [mm/workingset.c](https://github.com/torvalds/linux/blob/master/mm/workingset.c) and tried to simulate their policy, [DClock](https://github.com/ben-manes/caffeine/blob/master/simulator/src/main/java/com/github/benmanes/caffeine/cache/simulator/policy/irr/DClockPolicy.java). The policy's configuration is a guess based on the total system memory...

LIRS is an excellent algorithm but the papers are very confusing, making it difficult to write a correct implementation. It is not a concurrent policy, but their ClockPro algorithm is....

You can try read the [paper](https://ranger.uta.edu/~sjiang/pubs/papers/zhong21-LIRS2.pdf) and [source code](https://github.com/zhongch4g/LIRS2). The paper wasn't detailed enough and I did not try to port their C++ code to the Java simulator. It would...

Hi @StephenFlavin, You can open another issue or a discussion topic. All of our expiration / refresh operations are time-based. Previously these were on fixed schedules, e.g. 5 minutes from...

Yes, that would make for a more complete cache loader to control all policy aspects. However, that becomes cumbersome to work with as it includes expiration, refresh, and weight semantics....

Here is my thought process for the interface design as I am sketching it out. I believe the ✔️ cases handle the requirements and concerns expressed here and on the...

Yes. You must use `Caffeine.expireAfter(expiry)` to evaluate with, e.g. for a loading cache. The `Cache.policy()` has extensions like `put(k, v, duration)` if you need more explicit control.