discourse/discourse — pull request #1431 by yoav-steinberg (2013-09-11 14:19:47+00:00)
Title: Single redis DB for discourse

The idea is to remove the use of multiple redis databases (db/cache_db) in discourse. It is generally considered bad design to use multiple redis databases. Instead the use of **keyspace prefixes** or separate **redis instances** is preferable.
**Keyspace prefixes** are good in case you want to be able to run the same app multiple times on the server. It seems like discourse does this to some extent but fails in other cases (such as no use of keyspaces for sidekiq).
Use of separate **redise instances** is ideal for it enables fine tuning of of data persistence, eviction policy, etc. based on the data requirements.
Ideally everything in discourse will be *keyspace prefixed* and you'll optionally you could use **separate instances** for each functionality (cache/job management/messaging/etc...).

With this patch I merely attempt to remove the requirement for multiple databases on the same instance, since it doesn't provide any added benefit (does it?) and therefore ads complexity (and yes, it makes it work with redis-cloud.com).

Let me know what you think.