zyra / ionic-image-loader

Ionic 2+ Component that loads images in a background thread and caches them for later use
MIT License
436 stars 137 forks source link

Images are not caching after app restarts #240

Open ghost opened 5 years ago

ghost commented 5 years ago

I'm using ionic-image-loader for caching images, first time it loads all images and cached images, if i close app and restart it then all images will load again, caching images are not loading, I have given caching age is 7 days. Inside app if I navigate to some other page and come back then images will be cached. Only app restarts or close app then only images not caching loading again. Please help me regarding this. I need all loaded images should be cached after app killed / restart

pierresh commented 5 years ago

Yes, I also meet that problem with version 6.3.2 and 6.3.3, and Ionic v3.9.2. Have you found a solution for this? This problem is probably the same as explained in #233 .

pierresh commented 5 years ago

What can we do to progress on that issue ?

Shtibel commented 5 years ago

Same problem !

pierresh commented 5 years ago

Actually I figure out that the spinner that appears after having restarted the app is just to load the picture from the cache. You can check like this: remove the API that fetches thumbnails before you restart your app, then the picture would still be shown after the app is restarted.

ghost commented 5 years ago

@pierresh so you are saying after app restarts also images are loading from cache ? then why do they take too much time to load if they are loading from cache?

zulkarnainshah commented 4 years ago

@swiftyone @flore2003 @fmendoza

I did the following tests and both failed:

  1. I checked network tab for the hit to image URL's and even after caching, the actual URL's are again called.

  2. I loaded images in first run. Then closed the app. Before relaunching the app, I disabled the internet on my device. Then I launched the app again. This time the images did not load from cache so i believe they were not cached at all