feat: enhance creation of recommendation keywords
This commit is contained in:
@@ -51,3 +51,10 @@ export async function createRecommendationResource(
|
||||
|
||||
cache.set(cacheId, JSON.stringify(resource));
|
||||
}
|
||||
|
||||
export async function getAllRecommendations() {
|
||||
const keys = await cache.keys("recommendations:movie:*");
|
||||
return Promise.all(keys.map((k) => cache.get(k))).then((res) =>
|
||||
res.map((r) => JSON.parse(r))
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user