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 dependency injection in angular?
Is angularjs extensible?
Explain $q service, deferred and promises.
How to load select box during page initialization using AngularJS?
Which one is fast between $digest and $apply?
What are angularjs modules?
Explain class and inheritance in js?
What is map in angular?
Can we use jquery library in angularjs?
What are the filters in angular js?
Why do we need provider aliases? And how do you create one?
What are the services in angular js?