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: 
Peter,
It's hard to say what the best solution is here without understanding all the context - but one approach which you could use is `findAndModify`. This will query for a single document and return it, and also apply an update to it. 

You could use this to find a document to process and simultaneously modify a "status" field to mark it as being processed, so that other workers can recognize it as such and ignore it.

There is an example here that may be useful:
<http://docs.mongodb.org/manual/reference/command/findAndModify/>
I am new to `mongodb` and not entirely sure what your query is trying to do, but here is how I would do it 

```
# suppose database is staging
# suppose collection is data
use staging
db.data.remove(<your_query_criteria>)

```

where is a map and can contain any search criteria you want 

Not sure if this would help you.