-
Since expireAfter(Expiry) is using TimeWheel underneath, may I know is there any limit there or it could work till Long.MAX based on the current implementation, and any performance concern in here. Thanks in advance. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Yes, it should work with |
Beta Was this translation helpful? Give feedback.
Yes, it should work with
Long.MAX_VALUE
as the duration. The internal restrictions apply to how far forward theTicker
can jump, which might occur with a unit test or otherwise fake time source. These constraints were to simplify the logic as considered out of scope as reasonable user behavior, but would not be harmful if violated.caffeine/caffeine/src/main/java/com/github/benmanes/caffeine/cache/TimerWheel.java
Lines 93 to 95 in 563ff7c