FeatureFuel
1

Allow customizing curl DNS cache timeout

Source: Kong/insomnia#3569 · opened by @iandunn
Problem


#1529 describes how libcurl reuses connections for 60 seconds by default. Because of that, switching between local and production hosts is inconvenient, if they share the same hostname.

Setting a Connection: close header doesn't seem to help.

It seems like the way to modify that cache is with the [CURLOPT_DNS_CACHE_TIMEOUT]( option. There doesn't seem to be a way to modify that in Insomnia, so I just have to wait 60 seconds each time I switch environments.

Ideal solution


What about introducing an environment variable that would pass the value along to CURLOPT_DNS_CACHE_TIMEOUT? That would let people set it to 0 if they want to disable the cache, or 120 if they want to extend it, etc.

Setting it per-environment would be good, since some environments can share hostnames while others don't.

Alternate solution


Allow plugins to set CURLOPT_DNS_CACHE_TIMEOUT.

cc @AdityaHarindar, @Shawyeok

No pledges yet. Be the first to back this.

Make a pledge

Pledge your monetary support if this feature is added.

$

Comments

No comments yet.

Replying to

Add a comment

What do you think about this feature request?


Similar requests