If you need to cache too much data, in the order of a MB or more, it's advisable to store it as byte arrays an convert back to rich objects on lookup. This makes wonders for app responsiveness.
On Wed, Jul 11, 2012 at 1:25 PM, Alex White <[email protected]> wrote: > I would do the same as Nic, singleton class that is available throughout > the app, I use the class for all global settings like colours for the > screens etc. > > If you are going to pass data up as parameters and it is quite large it is > worth looking at passing by ref rather than by value, also passing by ref > allows the data changes to persist. > > singleton example. > > namespace WizPR > { > public sealed class Core > { > public string DatabaseName {get;set;} > > static readonly Core instance = new Core(); > > static Core () { } > > > Core() { } > > > public static Core Instance { > get { return instance;} > } > } > } > > ATB > > Alex > > On 11 Jul 2012, at 17:14, Nic Wise wrote: > > public static Dictionary<string, List<YourType>> TheCache = new ... > > On a static class? eg YourType.Cache["foo"] could even do it, tho I'd say > it'd be a bit better to put it in it's own class (YourTypeCache? Naming > things is.... fun :) ) > > > I usually feed things into views, or they talk to a central singleton > class (eg for database access or to get a single client to talk to a REST > service). those often cache for me, too - to save on the network calls. > > On Wed, Jul 11, 2012 at 4:10 PM, Mike Murdock <[email protected]>wrote: > >> What the best ways to cache a generic list data between views.**** >> >> ** ** >> >> *Michael Murdock * >> *Software Engineer* >> >> (865) 482-1999 >> (865) 481-0921 fax >> www.allmeds.com**** >> >> ** ** >> >> _______________________________________________ >> MonoTouch mailing list >> [email protected] >> http://lists.ximian.com/mailman/listinfo/monotouch >> >> > > > -- > Nic Wise > t. +44 7788 592 806 | @fastchicken | http://www.linkedin.com/in/nicwise > b. http://www.fastchicken.co.nz/ > > Earnest: Self-employed? Track your business expenses and income. > http://earnestapp.com > Nearest Bus: find when the next bus is coming to your stop. > http://goo.gl/Vcz1p > mobileAgent (for FreeAgent): get your accounts in your pocket. > http://goo.gl/IuBU > Trip Wallet: Keep track of your budget on the go: http://goo.gl/ePhKa > London Bike App: Find the nearest Boris Bike, and get riding! > http://goo.gl/Icp2 > > _______________________________________________ > MonoTouch mailing list > [email protected] > http://lists.ximian.com/mailman/listinfo/monotouch > > > > _______________________________________________ > MonoTouch mailing list > [email protected] > http://lists.ximian.com/mailman/listinfo/monotouch > >
_______________________________________________ MonoTouch mailing list [email protected] http://lists.ximian.com/mailman/listinfo/monotouch
