StackExchange / StackExchange/StackExchange.Redis
Add 'keyPrefix' connection string parameter, similar to 'channelPrefix'
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 6.2k
- Forks
- 1.6k
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 43
Description
It would be nice if we could specify a global key prefix in the connection string, like we can with channels.
This would help us keep applications isolated when multiple applications are using the same redis database.
I realize it's possible to configure this in-code with the IDatabase extension method WithKeyPrefix, but it would be nice to have this configurable by the connection string so the application doesn't have to handle it itself.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing how connection-string parameters such as channelPrefix are parsed and applied, then compare that behavior with the existing IDatabase.WithKeyPrefix extension method. The work is done when a keyPrefix connection-string parameter provides the same global key-prefix behavior and tests cover application isolation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, redis
- Domain
- backend, databases
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100