Hi everyone. I like to use server actions in my Next.js projects, but now with version 15, I don't know how to cache data from client components using server actions. In version 14, I simply used unstable_cache. Can someone guide me?. Note: I don't want to use React Query and I think dynamicIO (experimental feature) only works for server.
#Cache: server actions from client
5 messages · Page 1 of 1 (latest)
🔎 This post has been indexed in our web forum and will be seen by search engines so other users can find it outside Discord
🕵️ Your user profile is private by default and won't be visible to users outside Discord, if you want to be visible in the web forum you can add the "Public Profile" role in id:customize
✅ You can mark a message as the answer for your post with Right click -> Apps -> Mark Solution
(if you don't see the option, try refreshing Discord with Ctrl + R)
you can still use unstable_cache. There wasn't any change. In the newer versions you can also "use cache" to cache stuff. However unstable_cache is waaay more stable than use cache. So I suggest you should use unstable_cache
Oh, thanks so much! I thought that I couldn't use it, but it was a misunderstanding of the documentation: https://nextjs.org/docs/app/api-reference/functions/unstable_cache
✅ Success!
This question has been marked as answered! If you have any other questions, feel free to create another post
Jump to answer
[Click here](#1320097858136838215 message)