I find that setting the property RequestCachePolicyto BitmapImageno effect on how the loaded bitmap, if the instance is BitmapImageinstalled Image Source.
For example, if I installed RequestCachePolicyin CacheOnly, I would not expect that no Internet traffic would happen - the specified image should be extracted only from the cache. But instead, I see a server request to upload an image:
source = new BitmapImage(bmi.UriSource,
new RequestCachePolicy(RequestCacheLevel.CacheOnly));
If I set the static property DefaultCachePolicyto HttpWebRequest, then the behavior of my application will change as I expected. those. when it is set to CacheOnly, network traffic does not occur.
Why property RequestCachePolicyon BitmapImagehas the desired effect?
source
share