Overview
NSURLConnection is really a complex and convenient class for handling low level connections. Usually, you use NSURLConnection class to establish an FTP/HTTP/HTTPS/FILE connections and get data from remote servers or local files. NSURLConnection aimed to be flexible and handy for some common tasks like redirect/authentication/cache. Also, before iOS 4.0, it adopted delegate design pattern, will send the request to remote server in separated thread automatically.
- NSURLConnection provide both on-disk and in-memory cache.
- There are two types of cache: local cache and remote cache.
- Setting cache policy when create a
NSURLRequest
instance is ONLY for local cache. - Currently only responses to
HTTP
andHTTPS
are cached.