Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

added db option and prefix #9

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
7 participants

weepy commented Oct 26, 2010

makes it easier handling > 1 app per redis instance

Owner

tj commented Oct 26, 2010

you can use "select" to use a different db

maritz commented Oct 28, 2010

+1 vote for prefix

Owner

tj commented Oct 28, 2010

you really want potentially hundreds of thousands of keys mixed in with your others? :p

maritz commented Oct 28, 2010

What's the downside of supporting prefixes for those who need it?

Owner

tj commented Oct 29, 2010

no downside really, its just that you misewell "select" another db, thats what it is for. We could add an option for that

weepy commented Nov 1, 2010

well the point of the prefix is so that you are sure you dont run into your other data that you are saving. You could have a different db just for your sessions, but perhaps it's nicer to have them in the same one ? -- also there's only 16 total dbs in redis

Owner

tj commented Nov 2, 2010

yeah... but 16 is quite a few, I think it is wayyyyy cleaner to just use a db

bminer commented Aug 11, 2011

16 databases is really not that many (especially if you are hosting many virtual hosts)... but no worries... Redis can now be configured to increase the number of databases. I agree with TJ... much cleaner to select another DB than to use prefixes. Although I must say it... wouldn't it be better for the databases to have names, not integers?

Owner

tj commented Aug 11, 2011

I saw rumour that SELECT and friends are deprecated, not 100% on that

mking commented Sep 5, 2011

+1 for prefix.

it looks like Salvatore wants select to go away.

bminer commented Sep 6, 2011

These are rumors, guys. SELECT is probably staying for a long, long time. A lot of people would disagree with me, but prefixing keys is not the way to go. It increases the string length of every key in the database... much overhead... what a waste! Unfortunately, Redis doesn't have much in the "key namespacing" department, other than the SELECT command (which is a primitive way of selecting a database - integers, really? I feel like I'm programming on an 8080). Why can't Redis work like MySQL and allow people to create named databases? Who knows?! But for now, I still think SELECT is the best we have.

Collaborator

chirag04 commented Oct 28, 2013

db and prefix both are present now. closing.

@chirag04 chirag04 closed this Oct 28, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment