Pick the fix
The app re-downloads a 2 MB catalog on every launch even though it changes weekly and the server sends an ETag. Fix?
Hint 1 of 1
What does the client need for ETag to help?
Choose an answer, then open Show answer below to check it.
Show answer
Answer: A Configure an OkHttp Cache so conditional requests return 304 when unchanged
Correct. With a cache, OkHttp sends If-None-Match and reuses the stored body.
Why not the others?
- B Store the catalog in a static variable. Lost on process death.
- C Compress the catalog. Still downloaded every time.
- D Increase the read timeout. Unrelated.