cURL / Mailing Lists / curl-library / Single Mail

curl-library

[RE]Re: About caching within libcurl

From: Parthiv Dave <daveparthiv_at_lycos.com>
Date: Wed, 04 Oct 2006 10:16:55 -0400 (EDT)


You may probably use CURLOPT_FORBID_REUSE option for libcurl to NOT reuse the connection.

 

Regards,

Parthiv

---------[ Received Mail Content ]----------
Subject : Re: About caching within libcurl
Date : Wed, 4 Oct 2006 09:07:34 +0200 (CEST)
From : Daniel Stenberg <daniel@haxx.se>
To : libcurl development <curl-library@cool.haxx.se>

On Wed, 4 Oct 2006, Mike Lee wrote:

> I am developing a embedded system using libcurl . It seem that libcurl
> cache up some memory and reuse connections for some situations.Could anybody
> tell me where i could reduce the caching or disable it within libcurl? Or i
> need to hack inside the code?

libcurl has several internal caches, the connection cache being one of them.
See: http://curl.haxx.se/libcurl/c/curl_easy_setopt.html#CURLOPTMAXCONNECTS

But you can just as well just close the easy handle and re-init a new one to
make sure libcurl doesn't add up data in any cache. Just remember that when
doing either of these approaches, you will get less good performance.

I don't remember exactly, but a cached connection is probably less than 10KB
of memory.

--
Commercial curl and libcurl Technical Support: http://haxx.se/curl.html

Received on 2006-10-04