CURL.SetOptionCACacheTimeout
----------------------------

Sets the life-time for cached certificate stores.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [CURL](component_CURL.md) | [13.0](newinversion130.md) | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |

MBS( "CURL.SetOptionCACacheTimeout"; curl; TimOut ) 

**MBS**( **"CURL.SetOptionCACacheTimeout";** /\* Sets the life-time for cached certificate stores. \*/  
**$curl**; /\* The CURL session handle. \*/   
**$TimOut**) /\* The timeout in seconds.e.g. 60 \* 60 \* 24 \*/ 

### Parameters

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

### Result

Returns OK or error.

### Description

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](CURLSetOptionCAInfo.md)) 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](https://curl.haxx.se/libcurl/c/CURLOPT_CA_CACHE_TIMEOUT.html) option in CURL manual.

### See also

- [CURL.SetOptionAcceptTimeoutMS](CURLSetOptionAcceptTimeoutMS.md)
- [CURL.SetOptionCAInfo](CURLSetOptionCAInfo.md)
- [CURL.SetOptionConnectionTimeout](CURLSetOptionConnectionTimeout.md)
- [CURL.SetOptionConnectTimeoutMS](CURLSetOptionConnectTimeoutMS.md)
- [CURL.SetOptionDNSCacheTimeout](CURLSetOptionDNSCacheTimeout.md)

### Release notes

- **Version 13.0**
    - Added [CURL.SetOptionCACacheTimeout](https://www.mbsplugins.eu/CURLSetOptionCACacheTimeout.shtml) and [CURL.SetOptionQuickExit](https://www.mbsplugins.eu/CURLSetOptionQuickExit.shtml) functions.

### Blog Entries

- [New in MBS FileMaker Plugin 13.0](https://www.mbsplugins.de/archive/2023-01-24/New_in_MBS_FileMaker_Plugin_13/monkeybreadsoftware_blog_filemaker)
- [Neues MBS Plugin 13.0 für Claris FileMaker](https://www.mbsplugins.de/archive/2023-01-17/Neues_MBS_Plugin_130_für_Clar/monkeybreadsoftware_blog_filemaker)
- [MBS Plugin 13.0 for Claris FileMaker](https://www.mbsplugins.de/archive/2023-01-17/MBS_Plugin_130_for_Claris_File/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin, version 13.0pr5](https://www.mbsplugins.de/archive/2023-01-02/MBS_FileMaker_Plugin_version_1/monkeybreadsoftware_blog_filemaker)

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

  
[CURL.SetOptionBufferSize](CURLSetOptionBufferSize.md) - [CURL.SetOptionCAInfo](CURLSetOptionCAInfo.md)

[HTML Version](CURLSetOptionCACacheTimeout.shtml)