Mastering Fetch API and Caching in NextJS

Поделиться
HTML-код
  • Опубликовано: 28 авг 2024

Комментарии • 5

  • @KadirKATIRCI
    @KadirKATIRCI 6 месяцев назад

    Thank you! Good explanation as i need...

  • @helciofranco6134
    @helciofranco6134 2 месяца назад

    Is this cache for a specific user-session or shared between every user?
    I'd like to understand if another user have accessed your site if he would trigger a new request or not

    • @taylorlindoresreeves
      @taylorlindoresreeves  2 месяца назад

      For a REST API it’s cached globally for all users. However, if using a server action, fetch requests are not cached.

  • @user-vm6py5gf8m
    @user-vm6py5gf8m 5 месяцев назад

    Thank You.Can I ask about how it would function for different users accessing server at different time.Does it revalidate at a set interval of say 60 secs or 60 secs elapsed after the user accessed the server
    Thank you for your explanation💥

    • @taylorlindoresreeves
      @taylorlindoresreeves  3 месяца назад

      I think it revalidates for each specific user. It's not global in that sense.