开发者

Any concept of iPhone Memory Store? memcache or redis for iPhone?

开发者 https://www.devze.com 2023-04-12 16:03 出处:网络
I\'m looking for some concept of a 开发者_StackOverflow中文版memory store for my iPhone App. There are some complex NSDictionaries I want to store in memory and read from, rather than parse the JSON s

I'm looking for some concept of a 开发者_StackOverflow中文版memory store for my iPhone App. There are some complex NSDictionaries I want to store in memory and read from, rather than parse the JSON stored in a database over and over.

If there is no such thing as a memory store, what options do I have? I tried putting inside user defaults, and reading it back again, but it seems to take just as long as the JSON parsing...


I decided to create a singleton class that contains the data I needed and it's being used by the entire app. Easy, simple and gets the job done


Storing in a binary plist in persistent memory is faster than an xml plist.

Use the NSPropertyListBinaryFormat_v1_0 option with NSPropertyListSerialization.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号