sqlalchemy / sqlalchemy/dogpile.cache

KeyType might not always be `str`

Open
#242 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
299
Forks
50
PR merge metrics
No merged PRs in 30d

Description

dogpile.cache.api defines KeyType: str
https://github.com/sqlalchemy/dogpile.cache/blob/main/dogpile/cache/api.py#L44-L45

Redis offers a hash/dict mapping for storage, which is accessible using the .hmget/.hmset methods from redis-py. The current backends do not support this, but third-party/developer backends and proxies do.

I'm not sure of the best way to support this for developers and potential future usage. The only thing i can think of is to extend KeyType to Union[str, Tuple[str]].

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 with KeyType in dogpile/cache/api.py and review how the current backends handle keys. Compare the interface with Redis hmget/hmset usage and third-party backend needs described in the issue. Done means the supported key type and compatibility expectations are clearly decided and documented or implemented.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, redis
Domain
backend-api-design
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.