Image Caching with Xaml in Xamarin Forms

If you have images that get loaded from a REST API that don’t often change like a user’s profile picture and you don’t want to have a delayed rendering you can use image caching.

This is how I do image caching in xaml with Xamarin Forms.

  1. You bind your image source URI or hard code the image url.
  2. Se the CacheValidity to the number of days you want to cache the image. I have its set to 14 days.
  3. Set the CachingEnabled to true, to enable the caching.
  4. Thats it!