RACCommunity / contributors

ReactiveCocoa's Community Guidelines
16 stars 1 forks source link

Set of network extensions #7

Open badeleux opened 8 years ago

badeleux commented 8 years ago

I'm planning to build set of extensions for RAC which will make building network requests easier. I want to create layer for caching, retrying, updating . I haven't thought about architecture cause firstly I'd like to ask whether this idea is worth doing whether it doesn't abuse FRP, and it's possible to do cause I'm kinda surprised there is no such a thing yet.

let racCache = ArchiverCache()
let fetchCriticalData = Alamofire...
fetchCriticalData.updateOn(didEnterForeground).cache(racCache, policy: CacheFallbackRemote).retryOn(retryButtonTapped)
RuiAAPeres commented 8 years ago

What are your thoughts on using NSURLCache, instead of your own custom cache?

badeleux commented 8 years ago

NSURLCache would be one of the options, sometimes would like to use DB for caching.

RuiAAPeres commented 8 years ago

Could a wrapper for Alamofire be something that would interest you?

badeleux commented 8 years ago

Well, it's kinda extended wrapper to Alamofire, but I don't see a strong reason why we would have to limit this extension to alamofire only.