Enhance ImageCache for url matching
Currently the cache key for the package icons in IconUrlToImageCacheConverter is the url. Now that NuGet.org maps and stores a private copy of the images, we can't assume that the image url from the metadata matches the image url from the package.
We should update the cache key mechanism to key off of the package id and version so that we get the same cache result regardless of whether we open from the metadata url or from the package url for a particular package id/version combo.
Changing the icon URL of an existing package wouldn't update the image displayed in the package viewer in this case. So the image object cache would need to be invalidated for that identity.
True, but maybe we can add another input to the multi binding and use it to eject that item from the cache in that mode?
Another idea is that local URL's, or urls for things that'd be within the package/filesystem, aren't cached at all as the assumption would be that it'd be fast enough to load again on-demand.
@campersau is this still an issue?
Yes, I think so. When opening a NuGet package which uses an IconUrl we currently store two cache entries for them, one with the nuget.org URL and one with the original IconUrl from the metadata.