rishabhdaim commented on code in PR #2879:
URL: https://github.com/apache/jackrabbit-oak/pull/2879#discussion_r3159533968
##########
oak-core-spi/src/test/java/org/apache/jackrabbit/oak/cache/impl/CacheBuilderTest.java:
##########
@@ -178,6 +178,33 @@ public void statsReturnsCorrectHitMissCounts() {
Assert.assertEquals(1, stats.missCount());
}
+ /** Zero-size caches evict written entries before they are visible to
later reads. */
+ @Test
+ public void zeroMaximumSizeEvictsImmediately() {
+ Cache<String, String> cache = CacheBuilder.<String, String>newBuilder()
+ .maximumSize(0)
Review Comment:
The caffeine can have a entry even with 0 size cache momentarily, since its
eviction logic is async.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]