I am assuming that SDWebImageSwiftUI takes the header Cache-Control max-age into account when defining the cache expiration date (not sure though).

But what happens if I set SDImageCache.shared.config.maxDiskAge in the AppDelegate? Like this:

// Set the image cache expiration to one day.
SDImageCache.shared.config.maxDiskAge = 60 * 60 * 24
// 250 MB
SDImageCache.shared.config.maxDiskSize = 250 * 1024 * 1024

I want to be sure which cache rule will apply, this one or the header max-age.

0

There are 0 best solutions below