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
Tag
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