Note that there are some explanatory texts on larger screens.

plurals
  1. POWhy is ASIDownloadCache cached data always be used?
    primarykey
    data
    text
    <p>I am using ASIDownloadCache to cache the download files, the code below is how I set the request and downloadcache. `request = [super initWithURL:url1]; [request setTimeOutSeconds:50];</p> <pre><code>ASIDownloadCache *cache = [[ASIDownloadCache alloc] init] ; [cache setStoragePath:[path stringByAppendingPathComponent:@"resource"]]; [cache setShouldRespectCacheControlHeaders:NO]; self.myCache = cache; [cache release]; [request setDownloadCache:self.myCache]; //[self setSecondsToCache:60*60*24*30]; [request setCachePolicy:ASIAskServerIfModifiedCachePolicy]; [request setCacheStoragePolicy:ASICachePermanentlyCacheStoragePolicy]; </code></pre> <p>` My problem is that when the url's header has been modified, the ASIDownloadCache is still using the cached data. Why? Someone knows the answer?</p> <p>The header of that url before changing is like the following:</p> <p>HTTP/1.1 200 OK Server: Apache/2.2 Cache-Control: public Content-Type: text/html; charset=UTF-8 Date: Mon, 07 Nov 2011 08:26:15 GMT Expires: Mon, 07 Nov 2011 08:23:35 GMT Pragma: public Transfer-Encoding: chunked Etag: 1320654215 Connection: Keep-Alive Last-Modified: Mon, 07 Nov 2011 08:23:35 GMT</p> <p>The header after modifying is like the following:</p> <p>HTTP/1.1 200 OK Server: Apache/2.2 Cache-Control: public Content-Type: text/html; charset=UTF-8 Date: Mon, 07 Nov 2011 08:28:49 GMT Expires: Mon, 07 Nov 2011 08:28:32 GMT Pragma: public Transfer-Encoding: chunked Etag: 1320654512 Connection: Keep-Alive Last-Modified: Mon, 07 Nov 2011 08:28:32 GMT</p> <p>Even the Last-Modified fields are not the same, it is still using the cached data. </p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload