drizzle-team / drizzle-team/drizzle-orm

[FEATURE]: Ability to cache tables

Open
#1,726 2 comments 20 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

### 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

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.