Daniel Sumara
1 min readNov 14, 2018

--

If your `MTAPIClient` doesn’t support collecting requests from same url, you may find yourself in situation when few clients ask from same resource and simultaneously few request will be processed for same resource until one finish.

Example:

Cell at index 0 ask your download method for “http://images.com/0.jpg”
Cell at index 1 ask your download method for “http://images.com/1.jpg”
Cell at index 2 ask your download method for “http://images.com/0.jpg”

When table view will appear there will be 3 request (one for 1.jpg and two for 0.jpg). Your cache doesn’t work.

Your cache mechanism should also handle situation like above.

--

--

No responses yet