In this tutorial, We will see how to implement caching of Http Reponse in Angular 4 using Interceptors.
In many cases, in your Angular Application there are some API's which are called frequently and whose data is not undergoing any changes.
Now calling the server API again and again can cause a code performance issue.
So we need some kind of mechanism in which we can cache the httpresponse for that particular httprequest.
So when the first time the API is called its response is stored in the cache using interceptor for that particular request.
And now when the second time, the APi is called for that same http request then the httpresponse is been fetched from the cache instead of
going to the server for bringing the data.
So this can help a lot in code performance.
We also have to note that ONLY and ONLY the API's whose response does'nt change frequently should only be cached. Also the API's regarding Authentication should NOT be cached.
So we have to handle these conditions in the cache interceptor where we are implementing the caching.
This tutorial is the continuation of the previous tutorial for Multiple Interceptors in Angular 4
Here is the Link :
• Multiple Interceptors in Angular
#Angular #Angular 8 #Angular7 #Angular 6 #Angular 5
На этой странице сайта вы можете посмотреть видео онлайн Caching HttpResponse in Angular длительностью часов минут секунд в хорошем качестве, которое загрузил пользователь Techie Ocean 10 Январь 2018, поделитесь ссылкой с друзьями и знакомыми, на youtube это видео уже посмотрели 15,050 раз и оно понравилось 111 зрителям. Приятного просмотра!