• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
(no subject)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

(no subject)


  • Subject: (no subject)
  • From: Mark Meyer <email@hidden>
  • Date: Thu, 2 Dec 2004 13:49:35 -0800

I'm trying to get the various NSURL*** classes to always cache data so I can get to it later. From reading the docs, one would think that the NSURLCache would be pretty helpful here, but I can't seem to get it to work with me. There are all sorts of provisions in the URL downloading classes to prevent one from getting stale data, but what do you suggest if your would prefer stale data? Do you need to allocate a new NSURLCache instead of using the shared one?

I imagine it would be easy enough to use NSURLDownload, save the info to disk and go from there, but as long as the URL classes are caching some of the data anyway, and it seems to be pretty efficient, I sure would like to use it.

I've tried various incarnations of this: [[NSURLCache sharedURLCache] storeCachedResponse:cachedResponse forRequest:URLRequest]; with no luck. It seems like it is still only caching what it wants to based on the http headers.

Any suggestions on changing the policy so *everything* gets cached regardless of what the server says should happen? Or is this the totally wrong approach if one wants to hang on to the received data for later use in the application?

Thanks

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Prev by Date: Manual binding issue
  • Next by Date: Re: Configuring and Compiling a BSD program against 10.2 Developer on 10.3
  • Previous by thread: Manual binding issue
  • Next by thread: Re: (no subject)
  • Index(es):
    • Date
    • Thread