wpf - Why does BitmapImage RequestCachePolicy get ignored? -


i'm finding setting requestcachepolicy property on bitmapimage has no effect on how bitmap downloaded when image's source set instance of bitmapimage.

for example, if set requestcachepolicy cacheonly, expect no internet traffic occur whatsoever - specified image should retrieved cache. instead, see request being made server download image:

source = new bitmapimage(bmi.urisource,    new requestcachepolicy(requestcachelevel.cacheonly)); // image gets downloaded! 

if set static defaultcachepolicy property on httpwebrequest, application behaviour changes in way expect. ie when it's set cacheonly, no network traffic occurs.

why requestcachepolicy property on bitmapimage not having effect expect?

according msdn site: http://msdn.microsoft.com/en-us/library/system.net.cache.requestcachepolicy%28v=vs.110%29.aspx

"caching web services not supported."


Comments

Popular posts from this blog

linux - Mailx and Gmail nss config dir -

c# - Is it possible to remove an existing registration from Autofac container builder? -

php - Mysql PK and FK char(36) vs int(10) -