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

Explain the differences between one-way binding and two-way binding.

886


What’s the difference between dirty, touched, and pristine on a form element?

1160


What is link?

833


What is the use of @viewchild?

841


What is difference between angular and angularjs?

816


What do I have to do to trick the browser into doing what I want?

865


What is the function of the $timeout service?

912


What is the difference between link and compile in angular.js?

905


What's new in angular 8?

842


What is angular 6 and why it is used?

854


What is the difference between ngoninit() and constructor() of a component?

938


What is the use of services in angular 4?

794


Explain factory method in angularjs?

843


Explain what is scope in angularjs?

862


Can you explain spa architecture in angularjs?

916