How to Stop Worrying About Image Freshness and Reduce the Image Network Traffic
Article Summary
Delivery Hero was burning through 9TB of image data daily. Their apps were sluggish, their network costs were astronomical, and users were waiting too long for images to load.
Staff Engineer Vladimir Iakunin breaks down how Delivery Hero's mobile team tackled image caching at scale. This deep dive covers six different caching strategies, from basic LRU to implementing stale-while-revalidate on mobile.
Key Takeaways
- Reduced image network traffic by 78% (from 9TB to 2TB daily)
- Cut median image response time by 56% (121ms to 53ms)
- Implemented stale-while-revalidate with custom OkHttp interceptor
- Most image libraries use tiny caches: Glide 250MB, Fresco 40MB, Coil 2%
- Standard HTTP caching fails mobile due to synchronous validation latency
Critical Insight
By adapting a browser caching strategy for mobile, Delivery Hero slashed image traffic by 78% while making their apps feel twice as responsive.