fix: disable drizzle query cache (NoopCache) to fix queryWithCache bug
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
import { drizzle } from "drizzle-orm/postgres-js";
|
import { drizzle } from "drizzle-orm/postgres-js";
|
||||||
import postgres from "postgres";
|
import postgres from "postgres";
|
||||||
|
import { NoopCache } from "drizzle-orm/cache/core/cache";
|
||||||
import * as schema from "./schema";
|
import * as schema from "./schema";
|
||||||
|
|
||||||
const connectionString = process.env.DATABASE_URL!;
|
const connectionString = process.env.DATABASE_URL!;
|
||||||
@@ -12,4 +13,4 @@ const client = postgres(connectionString, {
|
|||||||
console.log("[postgres.js notice]", notice);
|
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() });
|
||||||
|
|||||||
Reference in New Issue
Block a user