Unstable cache wrapper
Unanswered
Large oak-apple gall posted this in #help-forum
![Avatar](https://cdn.discordapp.com/embed/avatars/2.png)
Large oak-apple gallOP
I want to reuse unstable cache in different places with different input for same cached function. Is this correct implementation?
It will be used in static pages to use on demand revalidation for tags to rebuild only certain pages
It will be used in static pages to use on demand revalidation for tags to rebuild only certain pages
export function cachedOptions(ids: string[]) {
return unstable_cache(
async (ids: string[]) => {
return data
},
[],
{
tags: ids.map((id) => `options/${id}`),
},
)(ids)
}