Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

How to enable caching in $http service?

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is AngularUI router and how it is different from ngRoute?

1407


What are components life-cycles?

811


What is routerlink?

824


Can you bootstrap multiple angular applications on same element?

867


Which is better react or angular?

798


What is a dom in angular 2?

829


How does angularjs dependency injection work?

844


What is the difference between [ngfor] and [ngforof]?

793


How to apply validation in AngularJS?

1361


How would you optimize the application for better performance in angular 2?

730


Why is dom used?

750


What are the different types of filters in angular?

789


What are services in angular 2?

756


How to use $routeparams in generating the templateurl?

840


When should you use an attribute versus an element?

772