Re: Problem with cache and max-age

  Hi, my problem was that I don't known the HTTP Specification nor the Libwww well :-(. Finally I used only the reload modes HT_CACHE_OK and HT_CACHE_FLUSH and manage my proper expiration algorithm.

Note: the default HTCacheFilter don't get remote files that has its date of creation less than the cached file. It's because this filter add the cache control If-Modified-Since (HT_C_IMS in Libwww) and for that reason I replace this filter ;-)

Sorry for the annoyance and very thanks,

Naldo Alcalde H.

  ----- Original Message ----- 
  From: Naldo Alcalde H. 
  To: Libwww List 
  Sent: Wednesday, June 18, 2003 12:34 PM
  Subject: Problem with cache and max-age


  Hi friends, I've a problem and need to know if can you help me, thanks in advance. I used the libwww in order to implement the cache features, but it don't work correctly because when the page has expired, it continue using the cached file and don't use the remote file. I set the request cache options as follow:

  HTRequest_setReloadMode(m_request, HT_CACHE_VALIDATE );
  HTCacheMode_setExpires(HT_EXPIRES_AUTO);
  HTRequest_addCacheControl(m_request, "must-revalidate", ""); 
  HTRequest_addCacheControl(m_request, "cache-control", "max-age");
  HTRequest_addCacheControl(m_request, "max-age", "30"); //seconds

  However, it don't work :-( 

  Thanks,

  Naldo Alcalde H.

    

Received on Thursday, 26 June 2003 15:50:14 UTC