curl-users
Query regarding the caching problem faced with curl 7.19.3, how to disable cache usage ?
Date: Wed, 11 Jan 2012 18:36:48 +0530
Hi There,
I am using curl 7.19.3 in my C++ code.
My code fetches some http file, my problem is even after the file is being updated on web server,
It's still downloading the cached copy of it.
I want to know how to disable this behavior
I have tried following easy set option but it did not work me
curl_easy_setopt(handle, CURLOPT_FRESH_CONNECT, 1); // I guess this has got nothing to do with cache but still I tried and it did not help
curl_easy_setopt(handle, CURLOPT_FORBID_REUSE, 1); // I guess this has got nothing to do with cache but still I tried and it did not help
curl_easy_setopt(handle, CURLOPT_SSL_SESSIONID_CACHE, 0); // I guess this has got nothing to do with cache but still I tried and it did not help
after some search I found that there is something called "Pragma:nochache" header,
but I am not sure how to use this ? there is no curl_easy_setopt for doing this.
Though its not needed following is the codesnippet of how I am using curl
CURL* handle = curl_easy_init();
CURLcode err = CURLE_READ_ERROR;
if(handle)
{
currentStatus = kInitiated;
curl_easy_setopt(handle, CURLOPT_URL, myFileName);
curl_easy_setopt(handle, CURLOPT_WRITEFUNCTION, my_write_data_handler);
err = curl_easy_perform(handle);
curl_easy_cleanup(handle);
curl_global_cleanup();
currentStatus = kCompleted;
}
-asaiyed
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-users
FAQ: http://curl.haxx.se/docs/faq.html
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2012-01-11