fix: disable drizzle query cache (NoopCache) to fix queryWithCache bug

This commit is contained in:
Christopher Mayor
2026-04-27 12:01:42 -07:00
parent 561e7b546e
commit 419d96aedc

View File

@@ -1,5 +1,6 @@
import { drizzle } from "drizzle-orm/postgres-js";
import postgres from "postgres";
import { NoopCache } from "drizzle-orm/cache/core/cache";
import * as schema from "./schema";
const connectionString = process.env.DATABASE_URL!;
@@ -12,4 +13,4 @@ const client = postgres(connectionString, {
console.log("[postgres.js notice]", notice);
},
});
export const db = drizzle(client, { schema, logger: true });
export const db = drizzle(client, { schema, logger: true, cache: new NoopCache() });