O'Reilly logo

RestKit for iOS by Taras Kalapun

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

HTTP caching

There are three mechanisms to control a cache defined in HTTP standard, which are as follows:

  • Freshness: This mechanism will allow the user to use a response without rechecking it on the original server. It can be controlled by both the server and the client. For example, the Expires response header will give a date when the document becomes stale, and Cache-Control (the max-age directive) will inform the cache how many seconds the response is fresh (valid) for.
  • Validation: This mechanism may be used for checking whether a cached response is still good after it becomes stale. For example, if a Last-Modified header is in response, a cache can make a next request using the If-Modified-Since header and check if it has changed. The ETag ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required