Skip to content
New issue

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

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor Redis for better DX #142

Closed
christianhelp opened this issue Nov 26, 2024 — with Linear · 1 comment · Fixed by #155
Closed

Refactor Redis for better DX #142

christianhelp opened this issue Nov 26, 2024 — with Linear · 1 comment · Fixed by #155
Assignees
Labels

Comments

Copy link
Collaborator

christianhelp commented Nov 26, 2024

Description

  • A lot of our common Redis calls are spread all around our repo.
  • The only difference in calls is a key
  • This makes it very hard for those attempting to swap Redis providers for alternatives like Upstash to refactor all of the code and there are large opportunities for oversight
  • The way that the keys are designed currently forces users to use both a development and production instance of their Redis provider which can become costly and overall a hassle to deal with

Requirements

  • Create general Redis functions under apps/web/src/lib/utils/server/redis.ts to handle basic calls for sadd,hset,set,srem and any other generic Redis functions that appear two or more times.
  • For each of those functions created, append an environment variable such as HK_ENV with some sort of separator such as a "_" or "-" between the environment variable and the key itself.
@christianhelp christianhelp added the Feature label Nov 26, 2024 — with Linear
Copy link

linear bot commented Nov 26, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants