Question: Is Core Data in iOS 5 still the optimal way of caching things such as images (and their related metadata) in addition to other client-side data on the iPhone, or is SQLite the way to go if not all of the cache is being loaded into native controls such as UITableView? Some of the data I am looking to cache will be loadable by a UITableView, the other half of it will not. I know Core Data shines more with its integration into a table view, but I was curious if it's still worthwhile to explore for caching structured data that would normally come from a third party service.

Answer: 
Use the findAndRemove function as documented here:
<http://api.mongodb.org/java/current/com/mongodb/DBCollection.html>

The findAndRemove function retrieve and object from the mongo database and delete it in a single (atomic) operation.

findAndRemove(query, sort[, options], callback)

* The query object is used to retrieve the object from the database (see collection.find())
* The sort parameter is used to sort the results (in case many where found)
I make a new answer to remark the fact:

As commented by @[peterscodeproblems](https://stackoverflow.com/users/943749/peterscodeproblems) in the accepted answer. The native way to this in mongodb right now is to use the 

```
findAndModify(query=<document>, remove=True)

```

As pointed out by the [documentation](http://docs.mongodb.org/manual/reference/method/db.collection.findAndModify/#sort-and-remove).

As it is native, and atomic, I expect this to be the faster way to do this.