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
#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.
Comments
Similar requests
Allow user to change Mocha timeout
2 votes · 0 comments
Add one new option of Dropdown menu of each request item, name "Override from Curl"
6 votes · 0 comments
Add option to show curl
1 vote · 0 comments
Folder headers are not included in the generated curl for each request in the folder
1 vote · 0 comments
Client Certificate support tied to Smart Card
1 vote · 0 comments
No comments yet.