LRResty
LRResty copied to clipboard
Caching Support
I couldn't find any documentation with regards to caching support. Is that provided by the underlying HTTP connection mechanism or is there no caching support at the moment?
Hi there, caching is one area where LRResty is lacking at the moment but I'm definitely interested in improving it.
Initially I could do more to use the underlying NSURLConnection caching but I'd like to do some smarter stuff with etags and if-modified-since in the future.
iOS already contains a caching functionality for NSURLRequests, but doesn't write this cache to disk. So every app restart the cache is gone. I've been using a subclass of the NSURLCache that will actually persist to disk. This will make sure responses for NSURLRequests are persisted to disk if requested using NSURLRequest + requestWithURL:cachePolicy:timeoutInterval:.
Maybe an idea to integrate something like this in LRResty? See: https://github.com/rs/SDURLCache