Skip to content

Commit 52449bd

Browse files
oschwaldclaude
andcommitted
Correct misleading capacity Javadoc in CHMCache
The CHMCache(int) parameter doc claimed the cache evicts entries once capacity is reached. There is no eviction policy: as the class-level Javadoc and the implementation show, the cache simply stops accepting new entries once it is full. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent cc9622d commit 52449bd

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/main/java/com/maxmind/db/CHMCache.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ public CHMCache() {
2727
* Creates a new cache with the specified capacity.
2828
*
2929
* @param capacity
30-
* the maximum number of elements the cache can hold before
31-
* starting to evict them
30+
* the maximum number of elements the cache can hold before it
31+
* stops accepting new entries
3232
*/
3333
public CHMCache(int capacity) {
3434
this.capacity = capacity;

0 commit comments

Comments
 (0)