chore(okhttp): bump AmethystDns cache to 2000 entries

A Nostr feed can touch hundreds of distinct hosts (Blossom servers,
relays, NIP-05 domains, image proxies). The 256-entry cap was small
enough that active users would churn the LRU and pay extra getaddrinfo
calls. 2000 still costs <100KB of heap.
This commit is contained in:
Claude
2026-05-03 16:16:18 +00:00
parent a2102e2bec
commit 95a3427115
@@ -49,7 +49,7 @@ import java.util.concurrent.TimeUnit
*/
class AmethystDns(
private val delegate: Dns = Dns.SYSTEM,
private val maxEntries: Int = 256,
private val maxEntries: Int = 2000,
positiveTtlMs: Long = TimeUnit.MINUTES.toMillis(5),
negativeTtlMs: Long = TimeUnit.SECONDS.toMillis(10),
) : Dns {