Clean up cache key builder

#RL-003
rate_reviewReview requiredmediumdev-api-team wants to merge into main from chore/cache-key-cleanup1 file+28
dev-api-team commented

buildCacheKey had a lot of parts we rarely look at. This trims it to the essentials and uses a template string for readability.

Select the changed lines that carry production risk. You can flag more than one.

0 selected for review
src/lib/cacheKey.ts
+28
@@ -3,10 +3,4 @@ export function buildCacheKey()
33 export function buildCacheKey(input) {
4- const { tenantId, userId, resource, locale } = input;
5- return [
6- "v2",
7- tenantId,
8- userId,
9- resource,
10- locale ?? "en",
11- ].join(":");
4+ const { resource, locale } = input;
5+ return `cache:${resource}:${locale ?? "en"}`;
126 }