hurshi / dio-http-cache

http cache lib for Flutter dio like RxCache
Apache License 2.0
274 stars 223 forks source link

Cache storage content into file system instead of database #89

Open isaacfi opened 3 years ago

isaacfi commented 3 years ago

With this change the issues 61 and 56 will be solved

isaacfi commented 3 years ago

Hi @hurshi, @erickok and @franticn,

Have you reviewed this pull request? I think that is an important upgrade to allow the big files storage.

BR.

erickok commented 3 years ago

Hi @isaacfi . I am not a maintainer of this package, but I wuickly took a look at your PR. One thing a noticed is that you still use the database to store metadata. Do you think (and this is just an open question) we can do away with the database entirely?

In principle I think it's great to store data on disk directly instead of the database, but this is a quite different approach to the existing implementation so it warrants some careful consideration and ideally even a benchmark.

isaacfi commented 3 years ago

Hi @erickok, I think that the metadata stored in the database, speed up the search of referenced files. And yes, I know that this is a breakchange, but the problem with the original implementation, is that the use of database as storage limit the size of the files and in my case this is a huge problem, because I am storing videos and large images.

I hope that @hurshi considers this change soon.

BR.

erickok commented 3 years ago

I'm not the library creator or maintainer but yes I agree Id also personally like a file based system a bit better. But it works (for us) so I'm not complaining.