Flutter_cached_network_image: App terminate and restart, image re download

Created on 28 May 2020  路  4Comments  路  Source: Baseflow/flutter_cached_network_image

Thank you for making a great plugin.

My question is, when I quit the app and restart it, the image is downloaded again.

I wonder if this is the intended behavior.

In my guess, the image of the same URL once downloaded, should be taken from the local disk cache.

Please answer, and have a nice day.

question

Most helpful comment

No indeed it should not download the image again. Hard to tell what's going wrong without any more information. Maybe the server is setting the cache-control headers to 0 or something like that.

All 4 comments

No indeed it should not download the image again. Hard to tell what's going wrong without any more information. Maybe the server is setting the cache-control headers to 0 or something like that.

No indeed it should not download the image again. Hard to tell what's going wrong without any more information. Maybe the server is setting the cache-control headers to 0 or something like that.

thank you.

Let's change my server settings.

If I have a question again, may I ask a question again?

Thank you very much!!

You can always ask, but maybe you get answers quicker on stackoverflow.

You can always ask, but maybe you get answers quicker on stackoverflow.

Thanks!

it works.

-- server side added
res.setHeader("Cache-Control", "max-age=604800");

Was this page helpful?
0 / 5 - 0 ratings

Related issues

anass-naoushi picture anass-naoushi  路  5Comments

port3000 picture port3000  路  5Comments

gregko picture gregko  路  6Comments

love-bkpp picture love-bkpp  路  5Comments

srburton picture srburton  路  6Comments