Closed MichelMelhem closed 4 years ago
Hydration is taking an object that exists in memory and populating it with domain data from database for example and that is not the job of this library.
If you are using this library as persisting data to database, you have made architectural error and should rethink what this library solves and what you are trying to solve.
Use it for what is was meant - caching. You have to implement database logic by yourself.
@genert Felangel said me that he could implement HiveDb to hydrated_bloc, he just ask me to open a feature request ^^
Hey @MichelMelhem 👋 Thanks for opening an issue!
I think there are two requests here: use HiveDB and allow for long-term persistence.
It sounds like you're more interested in the latter so I can expose an optional storagePath parameter on the built-in HydratedBlocStorage
.
Regarding using Hive it's more of an implementation detail and I will first do a performance comparison before deciding whether or not to incorporate it.
Hello, Actually i'm using Hydrated_bloc not as a cache for my app but more as adatabase. I have two problems with it : First, hydrated bloc use temporary temporary storage so it can be wiped at any time. Second this do not support any encryption. I would sugget to implement Hive db as a way to persist data for two reasons : First hive support encryption, Hive is very light and powerfull and it can work on mobile, web and even desktop.
If you decide to add hive support please take in consideration to not init Hive inside a tempdir like is the case actually, so i could use it as a dataabase and not as a cache. Thank you for your help, Michel M