Add additional cache support for OkHttp#133
Add additional cache support for OkHttp#133andreynovikov wants to merge 2 commits intomapsforge:masterfrom
Conversation
| } | ||
|
|
||
| class InputOutputStream extends InputStream { | ||
| InputStream mInputStream; |
There was a problem hiding this comment.
Why the internal InputStream here since we already extend it?
There was a problem hiding this comment.
Because it's a kind of proxy. Do you wish to use super instead?
There was a problem hiding this comment.
Since we don't use internally a different InputStream type than the extended one, we could simplify the implementation?
There was a problem hiding this comment.
Also we could make the inner class static?
|
Do we need another implementation since OkHttp provides its own response cache and already exists OkHttpFactory(HttpResponseCache)? Reference opensciencemap#89, opensciencemap#100 |
|
Yes, that cache caches complete HTTP responses. I've implemented the same type of cache as in LwHttp when tile image blob is cached. This:
|
|
why would we need OkHttp cache without HTTP? And does it really make sense to think about someone changing the engine while keeping the cache? NO! Lastly, there is WAY newer version of OkHttp out there and before making changes like that we should upgrade to that. |
I opened #138 for that. |
|
Will return to it later after #138 |
|
@andreynovikov we can close this? |
Add cache support for OkHttp in the same format as LwHttp.