Re: Making NSCache evict only unreferenced objects
Re: Making NSCache evict only unreferenced objects
- Subject: Re: Making NSCache evict only unreferenced objects
- From: Chris Hanson <email@hidden>
- Date: Fri, 17 Jun 2011 11:28:28 -0700
On Jun 17, 2011, at 9:40 AM, Jens Alfke wrote:
> Basically this is a cache of database records, where the dictionary key is the primary key and the value is a parsed version of the row data. I want to cache these to minimize database calls. I also want to ensure that the value objects are unique, i.e. there is never more than one value object for a particular primary key.
Rather than reinventing all of this yourself, you should just use Core Data.
It provides both the uniquing and the database call minimization you're looking for, and a lot else besides.
-- Chris
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please 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