diff options
author | Rene Treffer <treffer@measite.de> | 2014-06-13 17:54:54 +0200 |
---|---|---|
committer | Rene Treffer <treffer@measite.de> | 2014-06-13 17:54:54 +0200 |
commit | 028700efe0345e764f598378cb64c5e57f980e33 (patch) | |
tree | b719f7687932ab3e878eefb4b049b765c61e6171 /src/main/java/de | |
parent | 8e848f7afdb1f4ac8ac5a56d20e7ea833c5c840c (diff) |
Make sure we initialize big enough if s.o. chooses small values
Diffstat (limited to 'src/main/java/de')
-rw-r--r-- | src/main/java/de/measite/minidns/LRUCache.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/java/de/measite/minidns/LRUCache.java b/src/main/java/de/measite/minidns/LRUCache.java index 132bf794..0262e4c5 100644 --- a/src/main/java/de/measite/minidns/LRUCache.java +++ b/src/main/java/de/measite/minidns/LRUCache.java @@ -48,7 +48,7 @@ public class LRUCache implements DNSCache { this.capacity = capacity; this.maxTTL = maxTTL; backend = new LinkedHashMap<Question,DNSMessage>( - Math.min(capacity, 11), 0.75f, true) + Math.min(capacity + (capacity + 3) / 4 + 2, 11), 0.75f, true) { @Override protected boolean removeEldestEntry( |