-
-
Notifications
You must be signed in to change notification settings - Fork 638
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
Need to be able to make it longer than 7 days #9
Comments
sorry this issue might actually belong to cache manager package. but basically cache manager does that:
but CacheEntity does :
it is hard to reason about whether or not the object will be used from the cache. This is the current state :
OK I now assume the image will be used from the cache.. well now another rule kicks in:
|
True, I can make that configurable, but that also gives the feeling that it is a real option. In any case using cache-control headers is better, also because when the validity expires the server can indicate that the file didn't change so you don't have to download it again. It also makes the harder to understand as you also indicate. Do you have a lot of files that don't have a cache-control header? Do you serve them from your own server, or are you depending on someone elses? |
all the images are loaded into Firebase Storage. Currently Flutter Firebase package does not allow to set any additional metadata. so they are default.
|
That's not really good no. |
yes good idea - I can potentially trigger a function that will alter the metadata (will find that out). the proper fix would be create a Pull Request on Flutter firebase package - also happy to do that but waiting for an answer from Flutter team on that. still would be good to make Cache manager ignore another option - give ability to inject you own as long as it satisfy certain interface that shall work.... I still feel that |
Hmm.. I am not sure about that. The server is supposed to know for how long a file is valid. For the application it would be guessing when to fetch a file again. |
No, that sounds a bit like a hack ...maybe I should change the code like you suggested to update max-age on a server.
|
I have fixed images so they have proper |
Hi @renefloor ,
7 days is not long enough. Imagine chat app where people share images.
if person does not open app for 7 days - next time everything will be extremely slow.
I actually do not understand what goals 7 days are achieving - since you have CacheManager that controls its size and removes oldest files automatically.
The easiest solution would be to move that into cache manager - so it will be configurable:
p.s. happy to make PR
The text was updated successfully, but these errors were encountered: