mirror of
https://github.com/moparisthebest/Conversations
synced 2024-12-02 21:52:21 -05:00
Make sure we initialize big enough if s.o. chooses small values
This commit is contained in:
parent
8e848f7afd
commit
028700efe0
@ -48,7 +48,7 @@ public class LRUCache implements DNSCache {
|
|||||||
this.capacity = capacity;
|
this.capacity = capacity;
|
||||||
this.maxTTL = maxTTL;
|
this.maxTTL = maxTTL;
|
||||||
backend = new LinkedHashMap<Question,DNSMessage>(
|
backend = new LinkedHashMap<Question,DNSMessage>(
|
||||||
Math.min(capacity, 11), 0.75f, true)
|
Math.min(capacity + (capacity + 3) / 4 + 2, 11), 0.75f, true)
|
||||||
{
|
{
|
||||||
@Override
|
@Override
|
||||||
protected boolean removeEldestEntry(
|
protected boolean removeEldestEntry(
|
||||||
|
Loading…
Reference in New Issue
Block a user