Use redis?
PiotrMisiurek opened this issue · 1 comments
As a result the december meeting of Warsaw Ruby User Group I thought about write i18n backend using redis after finished trendi18n. Now, when we have discussion about better way of backend reloading and cachin translations i think redis can be usefull even in this project.
Redis is something between key-value database and caching system. All data is stored in memory, but there is also asynch. write to file, so all data can be restored after redis terminate.
I have never use redis before, all my knowladge has the source in wrug's presentation about redis and it's documentation. I have some idea, how to store translation in key-value db:
- join locale, scope and locale to make a key
- Add method name and the end of key
For example, we have key "test" in scope "some.scope" in "en" locale. So, we should have following keys in db:
- en.some.scope.test:default
- en.some.scope.test:zero
- en.some.scope.test:one
- en.some.scope.test:few
- en.some.scope.test:many
What do you think about this idea?
don't use