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 are the different types of filters in angular?

740


How to make an ajax call using angular js?

819


What is the difference between ng-if, ng-show/ng-hide?

826


Explain the compilation process of angularjs?

731


What is angular httpinterceptor?

835


Who made redux?

752


What is router and why is it used in angular?

761


What is hostlistener in angular?

728


What is @injectable()? Why use?

744


What is the use of ng-cloak directive in angularjs?

812


Explain what is angular expression? Explain what is key difference between angular expressions and javascript expressions?

794


Explain component specific hooks?

734


What is the function of module?

746


How to create custom form validations in angular?

842


What is api in angular?

743