From 113a3321ff6dd55d0a72ad68986cd50580aeb9e5 Mon Sep 17 00:00:00 2001 From: Ben Manes Date: Wed, 25 Nov 2015 21:57:11 -0800 Subject: [PATCH] doc fixes --- .../benmanes/caffeine/cache/BoundedLocalCache.java | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/caffeine/src/main/java/com/github/benmanes/caffeine/cache/BoundedLocalCache.java b/caffeine/src/main/java/com/github/benmanes/caffeine/cache/BoundedLocalCache.java index 78cc2f4dd0..ba4bc6c2dc 100644 --- a/caffeine/src/main/java/com/github/benmanes/caffeine/cache/BoundedLocalCache.java +++ b/caffeine/src/main/java/com/github/benmanes/caffeine/cache/BoundedLocalCache.java @@ -105,9 +105,10 @@ abstract class BoundedLocalCache extends BLCHeader.DrainStatusRef * represented by a sentinel key that should not be used for map lookups. * * Expiration is implemented in O(1) time complexity. The time-to-idle policy uses an access-order - * queue and the time-to-live policy uses a write-order queue. This allows peeking at oldest entry - * in the queue to see if it is expired and, if it is not then the younger entries must not be - * too. + * queue and the time-to-live policy uses a write-order queue. This allows peeking at the oldest + * entry in the queue to see if it has expired and, if it has not, then the younger entries must + * not have too. If a maximum size is set then expiration will share the queues in order to + * minimize the per-entry footprint. * * Maximum size is implemented using the Window TinyLfu policy due to its high hit rate, O(1) time * complexity, and small footprint. A new entry starts in the eden space and remains there as long @@ -115,8 +116,8 @@ abstract class BoundedLocalCache extends BLCHeader.DrainStatusRef * main space. If the main space is already full, then a historic frequency filter determines * whether to evict the newly admitted entry or the victim entry chosen by main space's policy. * This process ensures that the entries in the main space have both a high recency and frequency. - * The windowing allows the policy to have a high hit rate when entries exhibit a bursty high - * temporal but low frequency access pattern. The eden space uses LRU and the main space uses + * The windowing allows the policy to have a high hit rate when entries exhibit a bursty (high + * temporal, low frequency) access pattern. The eden space uses LRU and the main space uses * Segmented LRU. */