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

Redis Refactor #155

Merged
merged 7 commits into from
Jan 3, 2025
Merged

Redis Refactor #155

merged 7 commits into from
Jan 3, 2025

Conversation

joshuasilva414
Copy link
Contributor

Why

  • Previous kv usage throughout the codebase was specific to vercel/kv making it hard to switch providers
  • Previous kv usage required one database per environment (development, production, etc.)

What

  • HK_ENV environment variable prepended to all kv keys allows different environments to run off of the same kv instance
  • Provides generic implementation of common redis commands under apps/web/src/lib/utils/server/redis.ts. Switching kv providers only requires reimplementing these commands to use the desired client

Satisfies

Copy link

vercel bot commented Jan 2, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
hack-kit-web ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 3, 2025 5:10pm

Copy link
Collaborator

@christianhelp christianhelp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good work. Thanks!

@christianhelp christianhelp merged commit 74498e7 into dev Jan 3, 2025
4 checks passed
@christianhelp christianhelp deleted the chore/141-redis-refactor branch January 3, 2025 20:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Refactor Redis for better DX Adds environment variable for Single Redis Instance
2 participants