Stash icon indicating copy to clipboard operation
Stash copied to clipboard

Ability to specify Redis Prefix

Open pborreli opened this issue 10 years ago • 10 comments

I would like to use multiple application with only one redis server and cannot find the way to specify prefix like in this example :

$redis->setOption(Redis::OPT_PREFIX, 'myAppName:');

Could you point me to a direction ? FYI, i'm using Stash with StashBundle inside a EZ5 project

pborreli avatar Jan 12 '15 14:01 pborreli

+1

lolautruche avatar Jan 12 '15 14:01 lolautruche

+1

avingtier avatar Jan 12 '15 15:01 avingtier

Wouldn't namespacing suffice for your needs? (http://www.stashphp.com/Grouping.html#namespaces)

Nakard avatar Jan 14 '15 10:01 Nakard

I can see a need for this, so I'll toss it on the list. Someone is working on a predis driver option, so I'm going to let them finish that up and then add the new option in.

tedivm avatar Mar 09 '15 05:03 tedivm

+1 cause redis is shared

kzap avatar Oct 12 '15 01:10 kzap

FWIW there is also an issue calling clear on the existing redis driver with no key name, which will blow away the entire redis database because it calls FLUSHDB

jimbojsb avatar Jul 13 '16 14:07 jimbojsb

Hey,

Anything happen with this? I've skimmed through the 3 Predis PRs and they all seem to have halted. If there's any interest I can potentially pick up from one.

alexwilson avatar Sep 06 '17 17:09 alexwilson

This would also be useful for managing lots of keys on large shared Redis databases.

deancsmith avatar Dec 20 '17 02:12 deancsmith

👍

szepeviktor avatar Oct 06 '18 18:10 szepeviktor

Just waiting on a PR :-)

tedivm avatar Oct 06 '18 22:10 tedivm