StackExchange / StackExchange/StackExchange.Redis

Add 'keyPrefix' connection string parameter, similar to 'channelPrefix'

Open
#1,708 1 comment 2 reactions 0 assignees View on GitHub

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.