I have a table (dictionary of dictionaries) to store mapping of integers to strings. I have types and sub-types. e.g. type 1=>fruits and sub-type 1=>apple.
The mapping shall be configurable in my setting interface, but for the reset of the application, it's rather static. So I don't want to read from property-list every time I check the mapping. I'd like to only read once when program starts and only write when user changes setting.
Where should I keep this table at runtime? I have two approaches in mind: (1) is to put the entire table as a variable in the application delegate, in this case, I need to use objectForKey twice every time I need to get a string. (2) is to create a class with a static variable (not sure how to do it yet) and use class method to get the mapping e.g. +(NSString) stringForType: subType:
Could you please evaluate these two approaches or suggest better solutions? Thanks a lot!