# NextJS 13 Caching?

**URL:** <https://forum.codewithmosh.com/t/nextjs-13-caching/22429>\
**Category:** React\
**Created:** [September 11, 2023, 3:21am UTC](https://forum.codewithmosh.com/t/nextjs-13-caching/22429 "2023-09-11T03:21:37Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![capybara](https://avatars.discourse-cdn.com/v4/letter/c/34f0e0/32.png) [@capybara](https://forum.codewithmosh.com/u/capybara)\
**Post date:** [September 11, 2023, 3:21am UTC](https://forum.codewithmosh.com/t/nextjs-13-caching/22429/1 "2023-09-11T03:21:37Z")

</div>

It’s not entirely clear to me how NextJS caching works.  
I’ve read the docs here: [Building Your Application: Caching | Next.js](https://nextjs.org/docs/app/building-your-application/caching#data-cache)  
This seems to explain how caching works – particularly via memory (memoization), data cache, and finally data source – however I still have questions.

If I have a SSR component, and I make an external query for some resource, how long is this cached until it’s stale? Is there a default time limit? I’m not seeing one.

Also, when I specify a next.revalidate (e.g., 10 seconds) in my fetch request, the first request after 10 seconds is still served as stale data, and only then does the server re-request the data, correct? This would mean the user making a request after 10 seconds would still get stale data and only the next request would get the updated data. Is this correct?

It’d be helpful to go through this in a little more depth here.

---

<div class="post-metadata">

**Author:** ![capybara](https://avatars.discourse-cdn.com/v4/letter/c/34f0e0/32.png) [@capybara](https://forum.codewithmosh.com/u/capybara)\
**Post date:** [September 11, 2023, 11:44pm UTC](https://forum.codewithmosh.com/t/nextjs-13-caching/22429/2 "2023-09-11T23:44:08Z")

</div>

Mosh and team: any comment on this?
