Ben Manes

Results 652 comments of Ben Manes

Sounds like maybe this line needs to be wrapped in a try-catch that calls `removeLoadingValue` if an exception is thrown. It currently retains the failed. I saw something like this...

If you are running into locking, then you might consider setting a high `initialCapacity`. ConcurrentHashMap will create a lock per bin, meaning the size of the underlying table array. If...

You should run real workloads against the policies because it is very likely that you will significantly lower your hit rates. For example here is a SQL database trace. ![hit_rate](https://github.com/user-attachments/assets/a27ebc16-1d69-49d2-b4fc-3680bd6de186)...

> maybe they were taken from some public paper/talk/etc? If so, please provide a link to them. That trace came from the ARC paper (DS1, [repository](https://github.com/moka-rs/cache-trace/tree/ef0a9de8cf0202a1f2fee186a0af497774b0f0a9/arc)). Its search has similar...

It looks like your ClockPro is based on CockroachDB's, which in turn is based on the Python version. This might explain the hit rate you observe. It has been a...

Hi @kunga! > I also double-checked that I have the same implementation as CockroachDB has using their [canon-data test](https://github.com/cockroachdb/pebble/blob/8989e4e6c1764aea63ef66a37cfcb87f11f6b658/internal/cache/clockpro_test.go#L23). ~Thanks, I'll try to run the trace and give you back...

Oh I [generate](https://github.com/ben-manes/caffeine/blob/d49327cc417d9088a19143394d6c4fb292186c49/gradle/plugins/src/main/kotlin/lifecycle/java-library.caffeine.gradle.kts#L90) Javadoc using the later version than the source code. It works fine since the html rendering is independent and can target a release for the links, but...

Thinking about this and the JavaDoc shows a misunderstanding which I have encountered before. https://github.com/bndtools/bnd/blob/2c97dfdb61fadb2223f194f1242f4efbbf1ee3bd/gradle-plugins/biz.aQute.bnd.gradle/src/main/java/aQute/bnd/gradle/BndBuilderPlugin.java#L35-L39 For some reason, it tries to add the current project as a default dependency, expecting...

Yes, I believe the defaultDependencies can never succeed and does not help this plugin. If removed it would avoid an error appearing in the problem report.

fwiw, you can reconfigure the cache at runtime using [cache.policy()](https://www.javadoc.io/doc/com.github.ben-manes.caffeine/caffeine/latest/com.github.benmanes.caffeine/com/github/benmanes/caffeine/cache/Policy.html), e.g. [setRefreshesAfter(duration)](https://www.javadoc.io/doc/com.github.ben-manes.caffeine/caffeine/latest/com.github.benmanes.caffeine/com/github/benmanes/caffeine/cache/Policy.FixedRefresh.html). The features have to be defined at construction time, but afterwards you can perform feature-specific inspections and operations.