• 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
Re: Determining if a url exists
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Determining if a url exists


  • Subject: Re: Determining if a url exists
  • From: Jim Correia <email@hidden>
  • Date: Thu, 7 Feb 2008 09:12:47 -0500

On Feb 7, 2008, at 4:41 AM, Matthew Delves wrote:

On 07/02/2008, at 7:46 PM, Byron Wright wrote:

Just curious, why try and get around caching? Caching is usually there for good reason. For example a 304 would mean "not modified" (use your cache instead) so you can usually depend on the data you have stored locally.

I'm dealing with RSS feeds predominately. Whilst I would like to use Caching as much as possible, I have unfortunately run into the problem of knowing that a feed has been updated (ie, I opened it in Firefox) though unable to see the updated feed in my app.

Without more information (the URL, the response headers, etc.) it is not possible to tell. It may be that this is the correct behavior.


If you know of a better way to handle this, it would be much appreciated.

The way in which I'm getting the rss feeds is by calling

NSXMLDocument initWithContentsOfURL: options: error:

Modifying the URL to defeat the caching mechanism is not a good solution (as you have found out.)


In general, you should be using the cache to your advantage rather than trying to fight it. If you have a specific need to customize the fetch behavior, you'll have to download the data directly using the Foundation URL subsystem, and then create an XML document from the downloaded data. When using the URL subsystem directly, you can set the cache policy on your NSURLRequest.

Jim

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Re: Determining if a url exists (From: Matthew Delves <email@hidden>)

  • Prev by Date: Re: Use of Mac OS X 10.5 / Leopards Garbage Collection Considered Harmful
  • Next by Date: [OT] Registration Scheme Versioning
  • Previous by thread: Re: Determining if a url exists
  • Next by thread: Enabled Binding and Array Controllers
  • Index(es):
    • Date
    • Thread