3.41. CLOSEPOLICY

[<<<] [>>>]

curl::option CurlHandle,"CLOSEPOLICY"

This option sets what policy libcurl should use when the connection cache is filled and one of the open connections has to be closed to make room for a new connection. This must be OLD or FRESH. If you specify OLD as argument libcurl close the oldest connection, the one that was created first among the ones in the connection cache. If you specify FRESH libcurl close the connection that was least recently used, that connection is also least likely to be capable of re-use.

Example

curl::option CURL,"CLOSEPOLICY","OLD"
curl::option CURL,"CLOSEPOLICY","FRESH"

Note that the values are checked by the module case sensitive, thus you can not write "old" or "fresh" or mixed case words. Also the module does not tolerate any other form of the words, like OLDEST or NEW.


[<<<] [>>>]