[Bug]Images get cached without caching enabled
ClmnsRck opened this issue · 1 comments
My images for my server were cached and didn't refresh.
How can i tell the framework to always reload? It even cached the images between reboots of the iPhone ...
Hey,
I assume you're using v3 of the package. The answer depends on how you configure the cache.
If you did not configure the store, URLImage will use protocol cache policy. It should respect your cache header. You can change this using URLImageOptions
: .environment(\.urlImageOptions, URLImageOptions(urlRequestConfiguration: .init(cachePolicy: .reloadIgnoringCacheData)))
. This is basically URLRequest.CachePolicy
setting.
If you did configure the store that comes with the package, you can delete all or individual images. Look up in URLImageFileStore
and URLImageInMemoryStore
headers. It lacks documentation, but method names are self explanatory.
Hope this helps. If you think there is a bug, please open a new issue and fill in the bug report template. Thank you.