Open GeorgeLeithead opened 2 years ago
Comment in the code is out of date, we just need to delete it still, thanks! :)
Gong in deeper to the service handlers:
If you think things aren't working I'd love to see reproductions!
Just from looking at the code it seems like we indeed still need to implement caching for Windows (and Tizen although that isn't really our responsibility). I am curious what the "use a real caching library with the URI" comments mean.
Just from looking at the code it seems like we indeed still need to implement caching for Windows (and Tizen although that isn't really our responsibility). I am curious what the "use a real caching library with the URI" comments mean.
@jfversluis There is a lot of code. Things change and some things need review.
Looking even more at the code, it appears like none of the platform implementations meet what I would (IMO) expect from caching. Take for example the iOS implementation, which looks the most complete. I cannot find anywhere where the cache validity timespan is used or even referenced.
The TODO were there possibly (IMO) to indicate that a cross-platform Cache implementation is still required. Like done for XF Xamarin.Forms.Platform.Android/ImageCache.cs
Hi @GeorgeLeithead. We have added the "s/needs-repro" label to this issue, which indicates that we require steps and sample code to reproduce the issue before we can take further action. Please try to create a minimal sample project/solution or code samples which reproduce the issue, ideally as a GitHub repo that we can clone. See more details about creating repros here: https://github.com/dotnet/maui/blob/main/.github/repro.md
This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time.
This issue has been automatically marked as stale because it has been marked as requiring author feedback to reproduce the issue but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment. If it is closed, feel free to comment when you are able to provide the additional information and we will re-investigate.
I don't think there is a need for a 'repo', as the issue is in THIS repo!
I have looked at the code and it does look like UriImageSource
caching is now available for:
PlatformInterop.LoadImageFromUri
)However, it doesn't look like anything is available for the following, and there is no use at all of the CachingEnabled
property on these platforms:
See: src/Core/src/ImageSources/UriImageSourceService
See the code in https://github.com/dotnet/maui/blob/fecc58134be698c9c8349207a9b1c76ff8ef7554/src/Core/src/ImageSources/UriImageSourceService/UriImageSourceService.Windows.cs#L22 https://github.com/dotnet/maui/blob/fecc58134be698c9c8349207a9b1c76ff8ef7554/src/Core/src/ImageSources/UriImageSourceService/UriImageSourceService.iOS.cs#L48
Description
Looking at the
UriImageSource
control, in theGetStreamAsync
method it states the following which gives the impression that caching is not implemented. I believe that in Xamarin.Forms caching was done directly inImageSource
but in MAUI I believe it's done inUriImageSourceService
for the platforms?Should this be cleaned up as appropriate?
Steps to Reproduce
View the source of UriImageSource.cs
Version with bug
6.0.408 (current)
Last version that worked well
Unknown/Other
Affected platforms
I was not able test on other platforms
Affected platform versions
NA
Did you find any workaround?
No response
Relevant log output
No response