View Single Post
Old 03-20-2017, 04:52 AM   #1
beingchinmay
Registered User
 
Join Date: Jun 2015
Posts: 246
Arrow How to enable caching in $http service?

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.


Code:
$http.get("http://server/myserviceapi",{ cache:true **).sucess(function(){ //TO DO: **);



Fat Cutter | Hot Shaper | Asthijivak
beingchinmay is offline   Reply With Quote