imsamgarg / firebase_cached_image

Cache Manager and Cached ImageProvider for Firebase Cloud Storage Objects.
MIT License
9 stars 16 forks source link

Questions about adding web caching #1

Closed mdrideout closed 1 year ago

mdrideout commented 2 years ago

I was thinking of adding web caching to your plugin, but wanted to find out why this may not have been implemented already.

I was thinking of altering web_cache_manager.dart to convert the files to base64 for caching in sqflite, and decode from base64 for retrieval... or potentially just using a blob.

I was also thinking of using dart:indexed_db library for a more native web implementation according to this example, where video blobs are stored in the IndexedDB

Any thoughts on this? Web caching is important for my project. Just wanted to get any ideas or thoughts you may have already had before diving in.

Thanks!

imsamgarg commented 1 year ago

Hey!, Actually, I was also thinking the same and I have also implemented that feature using indexedDB but then I dropped it as the package analyzer (pana) that pub.dev uses marks our package non-null-safety package. But i think they have fixed it.

Oliver84 commented 1 year ago

are there any updates on this?

mdrideout commented 1 year ago

I ended up making a similar cross-platform ImageProvider that uses cross-platform HiveDB to store the blobs locally: https://pub.dev/packages/fireproof_closet

However, now I'm using imgproxy as an optimized image intermediary and can use the normal built-in Flutter image caching, and do not need to cache Firebase Storage data anymore.