Skip to content

Commit

Permalink
Add cache prefix
Browse files Browse the repository at this point in the history
nicholaspai committed Jan 9, 2025
1 parent 5cdec88 commit 3db3ac1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion api/_cache.ts
Original file line number Diff line number Diff line change
@@ -73,7 +73,10 @@ export function buildCacheKey(
}

export function buildInternalCacheKey(...args: (string | number)[]): string {
return buildCacheKey("QUOTES_API", ...args);
return buildCacheKey(
`${process.env.CACHE_PREFIX ? process.env.CACHE_PREFIX + "-" : ""}QUOTES_API`,
...args
);
}

export async function getCachedValue<T>(

0 comments on commit 3db3ac1

Please sign in to comment.