Please sign in to comment.
Change RCTImageLoader's Cache System to default NSURLRequest's cache …
…system Summary: Before this PR, ```RCTImageLodaer```'s Cache was too big(200MB on disk) and It doesn't work with HTTP Cache-Control header. So to provide dynamic image, the users must have to add random value on url( ex. adding current date) to avoid cache. So I change that cache system to default ```NSURLRequest```'s cache system, which is well-working with HTTP specs. As the discussion on this issue #7571 , making custom cache policy processor is not ready yet and useless, over-tech things, I think. Even we have no plan about image cache system(or would change plan later), before having a nice plan, I think we should let user use image module with common HTTP Specs. So I remove custom ```NSURLCache```, and make logic like below, 1. try fetch image, 2. on response, get ```Date``` on response's header and make ```cacheKey``` with ```Date```. > (why? because if ```NSURLRequest```'s response was cached, the response's ```Date``` header dosen't change.) 3. find decoded imag Closes #8235 Reviewed By: bnham Differential Revision: D3469086 Pulled By: javache fbshipit-source-id: 35a5552cda6e6c367481020bbf3c28eb4a9d0207
- Loading branch information...
Showing with 149 additions and 181 deletions.
Oops, something went wrong.