Skip to content

Commit

Permalink
updated comment
Browse files Browse the repository at this point in the history
  • Loading branch information
jdereg committed Jun 23, 2024
1 parent 4ddf44b commit 411cd8b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main/java/com/cedarsoftware/util/LRUCache.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
* This class provides a thread-safe Least Recently Used (LRU) cache API that will evict the least recently used items,
* once a threshold is met. It implements the Map interface for convenience. It is thread-safe via usage of
* ConcurrentHashMap for internal storage. The .get(), .remove(), and .put() APIs operate in O(1) without any
* blocking. A background thread monitors and cleans up the internal Map if it exceeds capacity. In addition, if
* .put() causes the background thread to be triggered to start immediately. This will keep the size of the LRUCache
* close to capacity even with bursty loads without reducing insertion (put) performance.
* blocking. When .put() or remove() queues a call to a background cleanup thead that ensures cache.size <= capacity.
* This maintains cache size to capacity, even during bursty loads. It is not immediate, the LRUCache can exceed the
* capacity during a rapid load, however, it will quickly reduce to max capacity.
* <p>
* @author John DeRegnaucourt ([email protected])
* <br>
Expand Down

0 comments on commit 411cd8b

Please sign in to comment.