Next.js Discord

Discord Forum

I see "unstable_cache" used thoughout the Platforms app, but can't find docs?

Unanswered
New Guinea Freshwater Crocodile posted this in #help-forum
Open in Discord
New Guinea Freshwater CrocodileOP
Can someone kindly point to documentation on this, trying to rpdocutionize an app so trying to get a full grasp of all caching techniques.

7 Replies

Giant panda
It's not in the docs yet.
Still unstable and very new.
New Guinea Freshwater CrocodileOP
@Giant panda I'm happy to at least understand how it works, especially as it's a marketed starter project. 😁
New Guinea Freshwater CrocodileOP
best not to use code that one doesn't understand, I had a look for learnings, they obviously used that to solve problems that what is in the doesn't i guess
Giant panda
I'll try to provide some info on it later. I'm on mobile so a bit difficult. I'm currently using it on a project.
New Guinea Freshwater CrocodileOP
anyway thanks a lot @Giant panda !
Giant panda
@New Guinea Freshwater Crocodile The basic structure

  const data = await unstable_cache(
    async () => await /* whatever you are using to fetch data here. */,
    [slug],
    { tags: [slug] }
  )();