And that's now it for this section.
In this section, you learned a lot about
the behind-the-scenes work NextJS does when it comes
to caching data and avoiding unnecessary requests.
You learned that there is a lot of built-in functionality
when using the fetch function
to get data from an external API.
And you learned how you can control how that data
will be revalidated and when the cache will be revalidated,
and pages that use cache data will be rerendered there for.
But you also learned how to manage your own cache
and how to enable request deduplication
when using your own data source,
like here, where I'm using a database.
With help of the cache function provided by React
for request deduplication,
and with help of the unstable cache function
provided by Next to cache data in the data cache,
and therefore, also allow NextJS
to perform aggressive caching
when using your own data source.
And you also learned how to revalidate that cache data,
either with revalidate path or revalidate tag.
Now, as mentioned at the beginning of this section,
you can dive deeper into caching and all the details
and all the behind-the-scenes stuff if you wanna learn
all about it with help of the official documentation.
But you don't need to do that.
You just should know
that NextJS does perform aggressive caching.
And you should know which tools and options you have
for making sure that data is refetched
and pages are rerendered when you need them to be rerendered
and when you need the data to be refetched.