Topics   All   Mac OS X (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server   Client   Old   Guides   Examples
New in version: 7.1   7.2   7.3   7.4   7.5   8.0   8.1   8.2   8.3   8.4    Statistic  

CURL.SetOptionDNSCacheTimeout

Sets the DNS Cache Timeout in seconds.

Component Version macOS Windows Server FileMaker Cloud FileMaker iOS SDK
CURL 2.5 Yes Yes Yes Yes Yes

MBS( "CURL.SetOptionDNSCacheTimeout"; Handle; Value )

Parameters

Parameter Description Example value
Handle The CURL session handle. $curl
Value The new timeout in seconds. 60

Result

Returns "OK" on success.

Description

Sets the DNS Cache Timeout in seconds.
Name resolves will be kept in memory for this number of seconds. Set to zero to completely disable caching, or set to -1 to make the cached entries remain forever. By default, libcurl caches this info for 60 seconds.

The name resolve functions of various libc implementations don't re-read name server information unless explicitly told so (for example, by calling res_init(3)). This may cause libcurl to keep using the older server even if DHCP has updated the server info, and this may look like a DNS cache issue to the casual libcurl-app user.

See also DNS_CACHE_TIMEOUT option in CURL manual.

See also

Created 18th August 2014, last changed 18th August 2014


CURL.SetOptionCustomRequest   -   CURL.SetOptionDNSInterface

Feedback: Report problem or ask question.




Links
MBS Xojo tutorial videos