Components All New MacOS Windows Linux iOS
Examples Mac & Win Server Client Guides Statistic FMM Blog Deprecated Old


Sets the life-time for cached certificate stores.

Component Version macOS Windows Linux Server iOS SDK
CURL 13.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes ✅ Yes
MBS( "CURL.SetOptionCACacheTimeout"; curl; TimOut )   More


Parameter Description Example
curl The CURL session handle. $curl
TimOut The timeout in seconds. 60 * 60 * 24


Returns OK or error.


Sets the life-time for cached certificate stores.
Pass a number, this sets the timeout in seconds. This tells libcurl the maximum time any cached certificate store it has in memory may be kept and reused for new connections. Once the timeout has expired, a subsequent fetch requiring a certificate store will have to build a new one.
Building a certificate store from a CAINFO file (see CURL.SetOptionCAInfo) is a slow operation so curl may cache the generated certificate store internally to speed up future connections.
Set to zero to completely disable caching, or set to -1 to retain the cached store remain forever. By default, libcurl caches this info for 24 hours.

See also CA_CACHE_TIMEOUT option in CURL manual.

See also

Release notes

Blog Entries

Created 22nd December 2022, last changed 22nd December 2022

CURL.SetOptionBufferSize - CURL.SetOptionCAInfo