drizzle-team / drizzle-team/drizzle-orm
[FEATURE]: Ability to cache tables
- Dominant language
- TypeScript
- Stars
- 35.8k
- Forks
- 1.6k
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 4
Description
### Describe what you want
The one thing I think drizzle is lacking compared to prisma, is the fact that drizzle seemingly has no caching system (if you do it isnt in the documentation anywhere). For tables that change very rarely if ever at all, having a caching system is essential.
being able to do something like:
```ts
const client = createClient(process.env.DATABASE_URL!, { prepare: false })
const cache = new RedisCache({ url: 'http://localhost:6379', tables: [users, posts], ttl: 12000, ... })
const db = drizzle(client, { cache })
```
and having custom cache drivers like `@drizzle/redis-cache` would be a game changer in terms of feature parody with prisma.
Contributor guide
Assessment
This issue has not been assessed yet.