3 ms·
I’m not sure I understand this. I’m working on a 100,000 line swift project and we don’t seem to have those problems. For example I just added a data caching s
by valuearb 6y ago
I’m not sure I understand this. I’m working on a 100,000 line swift project and we don’t seem to have those problems.
For example I just added a data caching system where a generic DataCache is used by most data types, with a few more sophisticated caches for special needs implementing the same DataCache protocols, so they can all plug in to the same places wherever needed.
And a series of CacheRefresh objects that inherit base refresh functionality from a superclass, and just impose the their specific REST api calls. And everything is written as functional as possible, with limited state and parameter dependent methods.
It’s working great, any model that needs caching can have a data cache, and any UI that needs to prefetch data can have a CacheRefresh object for each type of data it’s dependent on. I’ve pretty much minimized boilerplate and redundant code this way.
So what am I doing wrong, or what could I be doing better?