Take the 2-minute tour ×  I have a UIWebView that uses a custom
URL protocol that at some point touches a subclass of
NSURLCacheStoragePolicy. The users of my app noticed that it
takes quite some time to load background images for websites
displayed in my UIWebView. I'm trying to modify the policy to
cache images to disk.  How can I modify my
NSURLCacheStoragePolicy subclass to store images to disk, while
caching everything else in memory?  //the header has the
following comment     When we provide a response up to the
client we need to tell the client whether the      response is
cacheable or not.  The default HTTP/HTTPS protocol has a
reasonable      complex chunk of code to determine this, but we
can't get at it.  Thus, we have to      reimplement it
ourselves.  This is split off into a separate file to emphasise
that      this is standard boilerplate that you probably don't
need to look at.      extern NSURLCacheStoragePolicy
CacheStoragePolicyForRequestAndResponse(NSURLRequest * request,
NSHTTPURLRespons