• 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: Application Caches
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Application Caches


  • Subject: Re: Application Caches
  • From: Scott Anguish <email@hidden>
  • Date: Wed, 21 Mar 2007 17:14:05 -0400


On Mar 21, 2007, at 1:04 PM, Nick Zitzmann wrote:

On Mar 21, 2007, at 9:40 AM, Ryan Homer wrote:

Many applications make use of a cache stored in ~/Library/Cache/...

Is there a Cocoa framework to go with this that helps to store/ retrieve information in there or is this just a convention and you're responsible for creating your own files, etc.?

These cache directories are typically created and managed by the NSURLCache class, but you can store and retrieve whatever you want in the directory manually. However, it is for throw-away items, so if you need to save critical files, you'd best use Application Support instead. If you need to store temporary files, then use NSTemporaryDirectory() instead.

Actually, Caches is for any files that you want to save, but can easily reproduce. it's a convention.


The URL Download system is certainly one thing that uses this... but there are many others. For example, Address Book and Safari use this directory for storing the files that they create to work with Spotlight (because both apps use a single database approach, they need to split that up into multiple files in order to work with Spotlight)

	For more information, see

http://developer.apple.com/documentation/MacOSX/Conceptual/ BPFileSystem/Articles/WhereToPutFiles.html


_______________________________________________

Cocoa-dev mailing list (email@hidden)

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: 
 >Application Caches (From: Ryan Homer <email@hidden>)
 >Re: Application Caches (From: Nick Zitzmann <email@hidden>)

  • Prev by Date: NSDocument printInfo always returns same instance?
  • Next by Date: Re: imageNamed cannot load an image
  • Previous by thread: Re: Application Caches
  • Next by thread: Problem with NSImageCell and -setImageScaling
  • Index(es):
    • Date
    • Thread