Does the iPhone have a built-in caching mechanism (per application)?

Do I have to roll my own caching mechanism for data I'd like to persist, or is there something built-in that I can leverage? Any help would be great - thanks in advance!

Answers


There's no built-in caching mechanism per-se, but SQLite, CoreData, etc. are available (or you could just use the built in NSKeyedArchiver/NSKeyedUnarchiver if you're only interested in storing a small amount of data (such as user preferences) in standard language objects and don't want to use a plist based settings approach.

That said, I'm not sure how/if these are wrapped in monotouch. (Search for the above NSKeyed.. methods and NSCoding and all should be revealed.)


What variety of persist are you interested in?

For long term storage there is CoreData and sqlite. For inter invocation storage there are UserDefaults.


If it's just a little data--especially if it's user preferences and settings--there is NSUserDefaults. That's a pretty handy auto-persisting data interface. But it's not built for mass amounts of data.


Need Your Help

explode two-item-list in array as key=>value

php arrays explode

I'd like to explode a multi-line-string like this

error while configuring grunt-forever

gruntjs grunt-forever

I am on CentOS and working on a node.js - angular.js project and I have setup node to keep running in background even when logged out from the terminal, using forever module.

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.