Skip to content
This repository has been archived by the owner on Dec 4, 2023. It is now read-only.

Commit

Permalink
Merge pull request #275 from pobidowski/main
Browse files Browse the repository at this point in the history
  • Loading branch information
Asjas committed Oct 26, 2022
2 parents 29adcb8 + 6365bbd commit 0b812eb
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ export const createPrismaRedisCache = ({
cache.define(
model,
{
references: ({ params }: { params: MiddlewareParams }, key: string, result: Result) => {
return result ? [`${cacheKey || params.model}~${key}`] : null;
references: ({ params }: { params: MiddlewareParams }, key: string) => {
return [`${cacheKey || params.model}~${key}`];
},
ttl: cacheTime || cacheOptions.ttl,
},
Expand Down Expand Up @@ -99,8 +99,8 @@ export const createPrismaRedisCache = ({
cache.define(
params.model,
{
references: ({ params }: { params: MiddlewareParams }, key: string, result: Result) => {
return result ? [`${params.model}~${key}`] : null;
references: ({ params }: { params: MiddlewareParams }, key: string) => {
return [`${params.model}~${key}`];
},
},
async function modelFetch({ cb, params }: { cb: FetchFromPrisma; params: MiddlewareParams }) {
Expand Down

0 comments on commit 0b812eb

Please sign in to comment.