drizzle-team / drizzle-team/drizzle-orm

[FEATURE]: Use upstashCache with only the Redis URL

Open
#4,571 1 comment 11 reactions 0 assignees View on GitHub
enhancement
Dominant language
TypeScript
Stars
35.8k
Forks
1.6k
Avg merge
2d 7h
Merged PRs (30d)
4

Description

### Feature hasn't been suggested before.

- [x] I have verified this feature I'm about to request hasn't been suggested before.

### Describe the enhancement you want to request

I'm using Drizzle with Neon and I want to use the @cache version of the package to use Upstash for caching my queries. The thing is, I can only use this function by always passing `token` and `url`, but the thing is: I'm connecting to Upstash via the `Bun.RedisClient` and I don't have a token to pass. This is the code I'm using:

```ts
export const db = drizzle(process.env.DATABASE_URL ?? "", {
casing: "snake_case",
schema,
logger: true,
cache: upstashCache({
url: process.env.REDIS_URL ?? "",
global: true,
}),
});
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.