locked
Is ImageSource.FromUri cached? RRS feed

  • Question

  • User138 posted

    Or should we implement our own caching mechanism in the app?

    Wednesday, February 4, 2015 10:32 PM

Answers

  • User84670 posted

    I believe it's not cached. I use this way:

    TimeSpan timespan = new TimeSpan(90, 0, 0, 0); // 90 days
    
    Source = new UriImageSource {
                    Uri = new Uri(Uri.UnescapeDataString(url)),
                    CachingEnabled = true,
                    CacheValidity = timespan
                };
    
    • Marked as answer by Anonymous Thursday, June 3, 2021 12:00 AM
    Thursday, February 5, 2015 1:33 PM

All replies

  • User84670 posted

    I believe it's not cached. I use this way:

    TimeSpan timespan = new TimeSpan(90, 0, 0, 0); // 90 days
    
    Source = new UriImageSource {
                    Uri = new Uri(Uri.UnescapeDataString(url)),
                    CachingEnabled = true,
                    CacheValidity = timespan
                };
    
    • Marked as answer by Anonymous Thursday, June 3, 2021 12:00 AM
    Thursday, February 5, 2015 1:33 PM
  • User138 posted

    @Momm - excellent - thank you!

    Thursday, February 5, 2015 8:05 PM
  • User139568 posted

    @Momm actually it´s cached for 24 hours by default, according to documentation

    Monday, July 27, 2015 8:20 PM