Nice one, I made something initially very similar to what I see you made with grille in drive-db[1]. However I changed from an 'update the data when you call a function' to 'set a maximum-life for the data' format now as I just found myself making that new version manually in every project. The name will be changed from `timetout` to `cache` though as the name is confusing even for me.
When do you normally update the data? Are you using it in any public-facing project?
Also a couple more of differences I've seen:
- I store it in a file then retrieve from file or remote depending on the last time it was retrieved. This gives a mixed performance locally, but remotely not so much as server-server is quite fast. I might try storing in memory as you though, that should be way faster
- I use a mongodb-like syntax for finding, which allows for (I think) simpler use, but your syntax for sure allows for simpler debugging as you can see the data 'as-is'.
- Grille allows for more flexibility, but it also looks more complex. So our demo files are completely different [2]
So basically every advantage has a disadvantage (:
When do you normally update the data? Are you using it in any public-facing project?
Also a couple more of differences I've seen:
- I store it in a file then retrieve from file or remote depending on the last time it was retrieved. This gives a mixed performance locally, but remotely not so much as server-server is quite fast. I might try storing in memory as you though, that should be way faster
- I use a mongodb-like syntax for finding, which allows for (I think) simpler use, but your syntax for sure allows for simpler debugging as you can see the data 'as-is'.
- Grille allows for more flexibility, but it also looks more complex. So our demo files are completely different [2]
So basically every advantage has a disadvantage (:
[1] https://github.com/FranciscoP/drive-db [2] https://docs.google.com/spreadsheets/d/1fvz34wY6phWDJsuIneqv...