Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ExtendedImage.network(cacheMaxAge:Duration(days:1)) #504

Open
Yangpengtao opened this issue Aug 8, 2022 · 6 comments
Open

ExtendedImage.network(cacheMaxAge:Duration(days:1)) #504

Yangpengtao opened this issue Aug 8, 2022 · 6 comments

Comments

@Yangpengtao
Copy link

cacheMaxAge When the time is up, the picture cannot be loaded, which is expected. However, the disk size has not changed

@Yangpengtao
Copy link
Author

extended_image: ^6.2.1

@Yangpengtao
Copy link
Author

When the “cacheMax” is set, the picture reaches the expected effect and cannot be loaded. But the size of the acquired disk does not change.

@zmtzawqlp
Copy link
Member

cacheMaxAge means cache image to disk, if over it, we will remove cache file and load it from network age.

@gslender
Copy link

Can you change the behaviour slight to check for the URL to be present/available first, before you delete the expired cacheMaxAge ? Reason is that device could be offline/away from the network and the image might be not available (due to network unavailability) and even though the cache has expired (time wise), unless you can reload the image from the network, it should still be used.

@zmtzawqlp
Copy link
Member

Can you change the behaviour slight to check for the URL to be present/available first, before you delete the expired cacheMaxAge ? Reason is that device could be offline/away from the network and the image might be not available (due to network unavailability) and even though the cache has expired (time wise), unless you can reload the image from the network, it should still be used.

i will take a look later

@ps6067966
Copy link

even loading image from cache takes so much time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants