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

How can you create a decorator in angular?

885


When did you use currency filter in angularjs?

784


What is @output in angular?

905


Can localstorage be hacked?

850


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

841


What is grid in angular?

967


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

1156


What is an ng model?

846


What are the Output of AngularJS $http Service?

877


How to add rows in angular js?

874


What is difference between directive and component?

875


What is angular 2?

842


What is a decorator function?

842


What are dsl animation functions in angular js. List them.

898


What are typings in angular?

849