cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: About caching within libcurl

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Wed, 4 Oct 2006 09:07:34 +0200 (CEST)

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