Daily iOS
Networking

Response caching and memory cache

An image-heavy feed app keeps getting memory warnings. How should the response cache have been set up?

How would an interviewer hear this answer? You'll see whether they'd move on, dig in, or say no, and which sentences would trip you up. Your score doesn't change.
See the short answer

Split the cache into layers, HTTP cache (URLCache), memory cache, and disk cache, and put only downsampled images into the memory layer with a cost limit.

Share a question