UIWebView Cache

  1. 下載Peter Steinberger's fork of SDURLCache
  2. didFinishLaunchingWithOption:launchOptions中加入設定cache
    SDURLCache *urlCache =
    [[SDURLCache alloc] initWithMemoryCapacity:1024*1024   // 1MB mem cache
                                  diskCapacity:1024*1024*5 // 5MB disk cache
                                      diskPath:[SDURLCache defaultCachePath]];
    [NSURLCache setSharedURLCache:urlCache];
    

Reference:
http://stackoverflow.com/questions/8852327/use-core-data-as-browser-cache-in-afnetworking
https://github.com/steipete/SDURLCache