How to Implement HTTP Caching in Angular? | With Debugging | English | Project Tricks & Tips

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

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

  • @aram5642
    @aram5642 11 месяцев назад +1

    This is a bit of an exceptional example because the states basically never change. In other sfenarios it is useful to be able to have a force mode or an expiry check (store the last response timestamp). But a very good example with the interceptor otherwise, because this is where the logic belongs.

  • @trishnapampari2703
    @trishnapampari2703 8 месяцев назад

    Very nicely explained

  • @himns111100
    @himns111100 2 года назад +2

    Very beautifully explained

  • @voltairend
    @voltairend 4 месяца назад +1

    When will you reset the cache?

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

      There are many cases you can clear the cache, like the data changed by some events that time you can do.

  • @juandase5929
    @juandase5929 Год назад

    Good one,
    One question, when we need to update our cache, like timestamp.
    Could have mentioned, which situations we should opt cache techniques.

    • @partharanjan
      @partharanjan  Год назад

      If you want to store the cache for specific time period, then timestamp will come. Other wise it will lifetime.

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

    One doubt, if let say there is some change in states( new states are added) in between our use case, i.e we have first hit the get request and got the data and set it using map. But during this time new states have been added, with this logic new state wont be reflected in UI since we are using cache, until we reload the page. How can we fix this issue?

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

      There is method called clear cache, you can call and clear on state changed. Let me know if you any doubt I will share code. Keep watching!

  • @guatemaladarwinsegur
    @guatemaladarwinsegur Год назад

    I have a question if refres a page, the data in cache global is destroy? or exist after.

  • @srinivastadimalla1232
    @srinivastadimalla1232 7 месяцев назад

    Hi Sir.. I would like to learn few concepts from you and would like to pay you... Could you please let me know how to contact you?

    • @partharanjan
      @partharanjan  7 месяцев назад

      Thank you. Keep watching. You can feel free to ask any question here. I am happy to help. 😊