NSKeyedArchiver encode only part of an array NSKeyedArchiver encode only part of an array sqlite sqlite

NSKeyedArchiver encode only part of an array


Like Adam Ko I would suggest using Core Data:
This kind of problem is what it's really good at, after all!

If your cache items are independent from each other, this could be achieved by simply wrapping your cache-items by a thin layer of NSManagedObject (i.e. you could benefit from Core Data with only minor changes to your app).

This wrapper entity could store an archived version of a cache item in an attribute of type NSBinaryDataAttributeType and provide access to the unarchived object through a transient property.See Non-Standard Persistent Attributes for an example.