Skip to content

Instantly share code, notes, and snippets.

@hanshsieh
Created June 28, 2015 12:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hanshsieh/62cb7fe266845ba90449 to your computer and use it in GitHub Desktop.
Save hanshsieh/62cb7fe266845ba90449 to your computer and use it in GitHub Desktop.
Setup NSURLCache
- (BOOL)application:(UIApplication *)application
didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
NSURLCache *URLCache = [[NSURLCache alloc] initWithMemoryCapacity:4 * 1024 * 1024
diskCapacity:20 * 1024 * 1024
diskPath:nil];
[NSURLCache setSharedURLCache:URLCache];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment