ez-net-app icon indicating copy to clipboard operation
ez-net-app copied to clipboard

Images are not cached after fetching from Firebase.

Open TheLukaszNs opened this issue 7 years ago • 3 comments

What's the problem?

It takes some time for the app to fetch images from Firebase. But it's really annoying to wait for it when launching EzNet - ALWAYS. We should cache images to fetch them only one time or after updates.

How to fix it?

We can fix it by editing Api.js's getThumbnail method to store/cache thumbnails in device storage. I'll get on this in the next days

TheLukaszNs avatar Jan 23 '18 18:01 TheLukaszNs

I would like to take up this issue.

vibhavagarwal5 avatar Feb 18 '18 19:02 vibhavagarwal5

@vibhavagarwal5 Please proceed.

agentmilindu avatar Feb 19 '18 06:02 agentmilindu

What i observed in this problem was that even if you want to cache it you need a storage. You can use AsyncStorage for it, but that still will take some time to load. But one advantage of using it would be that every time you open the app, right now, it fetches from the web but by using AsyncStorage you would now fetch it offline also.
So what AsyncStorage would solve for you is cache all whole JSON(that you create from the firebase data) offline. But still you would need to wait a bit for the app to load from the the AsyncStorage.

vibhavagarwal5 avatar Feb 21 '18 20:02 vibhavagarwal5