ReasonJun

Next.js : Caching 본문

Frontend/Next.js

Next.js : Caching

ReasonJun 2023. 9. 10. 23:39
728x90

Next.js has a default caching mechanism aimed at enhancing performance and cost-efficiency. By default, it employs static rendering for routes and caches data requests unless you specifically choose not to use caching. Here's a summary of the default caching behavior:

  1. Static Route Rendering: Routes are statically rendered at build time. This means that during the build process, Next.js generates HTML pages for routes in advance, allowing for faster loading times when users visit those pages.
  2. Data Request Caching: Data requests made by your application are also cached by default. This caching helps reduce the load on servers and can improve response times for subsequent requests for the same data.

In essence, Next.js optimizes your application's performance and cost by caching static routes and data requests unless you decide to disable or customize this caching behavior.

 

 

 

 

https://nextjs.org/docs/app/building-your-application/caching

 

Building Your Application: Caching | Next.js

Next.js improves your application's performance and reduces costs by caching rendering work and data requests. This page provides an in-depth look at Next.js caching mechanisms, the APIs you can use to configure them, and how they interact with each other.

nextjs.org

 

 

728x90
Comments