views:

361

answers:

2

I'm really wondering what is stored in the mentioned path?

A side question: May a developer use this path (at least the folder) to store his own temp data?

+6  A: 

[...] what is stored [...] ?

Cached responses from webservers.

[...] use this path [...] ?

The directory is meant to use for application cache files. Get this path using:

NSArray* paths = NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES);
NSString* cacheDir = [paths objectAtIndex:0];
Nikolai Ruhe
obtaining 'cacheDir' is very useful, thanks! I see non zero Cache.db files even for applications without network functions. Is this file 'only' for responses from webservers?
cocoafan
Are you sure the apps have no network functions? For example, many apps have auto-updating, which will query a webserver for the latest app version.
iKenndac
Or they might link a library or just load a plugin (InputManagers, I'm looking at you!) that do! Any way: try `sqlite3 ~/Library/Caches/<my-app-bundle>/Cache.db .schema` to see what tables are in the database. I see three tables with names like `cfurl_cache_response`. I presume that's Apple's URL caching.
Nikolai Ruhe