How to enable caching in $http service?
Answer / chaitanya
You can enable caching in $http service by setting configuration property cache to true. When cache is enabled, $http service stores the response from the server in local cache. In this way, next time the response will be served from the cache without sending request to server. $http.get("http://server/myserviceapi",{ cache:true }).sucess(function(){ //TO DO: });
Is This Answer Correct ? | 1 Yes | 0 No |
What is the forroot method in angular4?
What is angular singleton service?
Can digest cycle be forced to run manually?
What is the aot compilation?
What is afterviewinit?
Explain what is injector in angularjs?
Explain currency filter and when to use it?
Why does angular need an entrycomponents?
What is $sce?
What is ivy rendering engine in angular 7?
What is @injectable in angular?
What is a service angular?