nst / STHTTPRequest

Obj-C / Cocoa HTTP requests for humans
BSD 3-Clause "New" or "Revised" License
826 stars 75 forks source link

Caching #32

Closed pkkasu closed 9 years ago

pkkasu commented 9 years ago

How to cache a request ? I am using this awsome library for RESTFul access coded in PHP. Is there any way to cache request on IOS and get from cache instead of server call again?

nst commented 9 years ago

By default, all requests are cached, provided that the response headers don't prevent caching.

Technically, STHTTPRequest uses the NSURLRequest cache policy, which by default is NSURLRequestUseProtocolCachePolicy.

You can read more on that here: http://nshipster.com/nsurlcache/