How to cache url data passed in the image widget? Mobile app.
Application Type

I am passing a URL to fetch image from AMazon S3 in a mobile app.

Is there a way to cache all these images(coming from the url) for a certain amount of time?

Hello, @Amol Rane To cache your images you can use a client variable, to hold your image for a certain amount of time.

Also, if you have more problems, if you didn't see them until now you can look for other forums' comments here:

Also the course about client variables and how to use them:

Hope this helps!


Márcio Carvalho

Hi @Amol Rane 

To cache an image on mobile I will suggest creating a local entity where you can store the image, and each time you logout or the app times out the entity will be cleaned.


Gonçalo Almeida

I am currently using local storage, but the problem is that there are multiple images(something like Netflix), and all images are not getting fetched at once. Multiple server calls have to be made to the server to get one image(From s3), hence takes a lot of time to load. I tried doing this asynchronously using BPT, but we can't access the local storage actions in BPT.

So I realized Caching would be the way to go, where I can directly cache the data fetched from image urls. 

Please do let me know if there's another way I can approach this problem.

Hello Amol,

I agree with @Goncalo Almeida, local storage is indeed the way to go. Here's a link to a similar question and the recommendation - How to cache images in mobile app | OutSystems 

If needed you may check out the section on how to build a light weight local storage here - OutSystems Mobile Best Practices - OutSystems

Best regards

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.