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

Is react backend or frontend?

734


What is a routing in angular js?

759


How do you use ng value?

723


What is The Manual Bootstrap Process in AngularJS?

812


Distinguish between factory, service & provider?

725


How to implement a datagrid table with angular 2 and primeng?

788


What is a typescript decorator?

741


Explain about single and multithread in javascript?

722


What is an angular 2 component?

807


What is the main purpose of find index in angularjs?

741


What is ecmascript ?

725


What the different between a directive and component?

768


What is the factory method in angular 2?

770


What is default scope in a angular directive?

753


How can primeng be used with angular2?

791