HttpImageSource since version 1.12 has support for disk caching to store downloaded images on the local disk using DiskCache property, so next time when we loaded image again with the same URL it will pick up from local disk instead of making request to the network.
But the current implementation of disk caching does not obey Http cache-control header sent by the server. So it always uses a local version even if the server mark image as stale and has to load again from the network.
We introduce DiskCachePolicy to give options on how DiskCache should behavior. There are two options:
Default: Honor cache-control header from the server
AlwaysUseLocalCache: Always use local data if available and ignoring the cache-control header
HttpImageSource
since version 1.12 has support for disk caching to store downloaded images on the local disk usingDiskCache
property, so next time when we loaded image again with the same URL it will pick up from local disk instead of making request to the network.But the current implementation of disk caching does not obey Http cache-control header sent by the server. So it always uses a local version even if the server mark image as stale and has to load again from the network.
We introduce
DiskCachePolicy
to give options on how DiskCache should behavior. There are two options:Note: This PR requires Uno PR: https://github.com/fuse-open/uno/pull/321
This PR contains: