Code
Why React cache() dedupes server reads
React cache() memoizes a function for one server request. That is why a layout and a page can both call getPostBySlug without hitting the disk twice.
· 1 min read
Topics
Tutorials, tools, and troubleshooting.
React cache() memoizes a function for one server request. That is why a layout and a page can both call getPostBySlug without hitting the disk twice.
· 1 min read