Change storage strategy
Change storage strategy with a few modifications to base source. FileStorage & Redis storage are now available, new strategies are easy to integrate.
Just a few things, usually when there are multiple core changes, they should be previously discussed.
- backward compatibility (should start from 4.4.0 at least)
- Why did you introduce a
ready()method? - We should discuss an abstraction layer for the storage.
- good the idea of a
multi()method - Actually I don't like this API:
const fileStorage = require('./src/storage').get('file', fileConfig)It's too verbose. Pheraps I'd suggest something like #4
Hi and thanks for the quick reply. I haven´t see your comments until now.
I know core changes must´ve been previously discussed.
A little background, To be honest I never intended to share the fork in first place, the changes fullfill its purpose on my project and then I tought It be a nice thing to share it with you.
2 - Storage channel isn´t always ready when attempt to use it ( Redis for instance ) 3 - Absolutely, the Json and DB references were all across the project. It was very difficult to abstract. 5 - Yeah me neither, come to it while programming usnig bottom to top approach.
@oscarnevarezleal we could start discussing for an abstraction layer looking for hints from other npm modules that uses multiple storage for their purposes (like express-session).
@roccomuso sure thing, how do you like to start?
Hi @roccomuso, @oscarnevarezleal I might start using this library and it would be great to be able to use redis. More generally, is the project still active?
@MeStrak it is but still don't officially support Redis