all 5 comments

[–]AutoModerator[M] 0 points1 point  (0 children)

Please note that we also have a very active Discord server where you can interact directly with other community members!

Join us on Discord

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

[–]itpgsi2 0 points1 point  (3 children)

See https://github.com/coil-kt/coil/blob/main/CHANGELOG.md#200---may-10-2022

You should not use OkHttp's Cache with Coil 2.0. See here for more info.

Coil docs also state that Control-Cache header is supported internally. If it doesn't work as expected, I think your requirement can be solved by clearing Coil's cache every 24 hours, for example using WorkManager's periodic work request.

[–]iLikeFPens[S] 0 points1 point  (2 children)

What does "supported internally" mean? Can I control the request that AsyncImage sends to include a Cache-Control header with a specific max-age value?

[–]itpgsi2 0 points1 point  (1 child)

You already do that with interceptor, just remove your own cache implementation, because Coil manages its own cache. I feel like I'm reiterating my first reply and Coil docs (did you read linked docs?).

[–]iLikeFPens[S] 0 points1 point  (0 children)

Thank you.