From 97900fcbfa8226877e87f16fc8b05b5e884ef61d Mon Sep 17 00:00:00 2001 From: Mattt Thompson Date: Tue, 26 Jun 2012 09:37:53 -0700 Subject: [PATCH] Setting NSURLCache memory and disk capacity to Apple default settings --- Example/AppDelegate.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Example/AppDelegate.m b/Example/AppDelegate.m index 2e27051..22ea848 100644 --- a/Example/AppDelegate.m +++ b/Example/AppDelegate.m @@ -35,7 +35,7 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { - NSURLCache *URLCache = [[NSURLCache alloc] initWithMemoryCapacity:1024 * 1024 diskCapacity:1024 * 1024 * 5 diskPath:nil]; + NSURLCache *URLCache = [[NSURLCache alloc] initWithMemoryCapacity:4 * 1024 * 1024 diskCapacity:20 * 1024 * 1024 diskPath:nil]; [NSURLCache setSharedURLCache:URLCache]; [[AFNetworkActivityIndicatorManager sharedManager] setEnabled:YES]; @@ -66,7 +66,7 @@ didFinishLaunchingWithOptions:(NSDictionary *)launchOptions @synthesize tweetsArrayController = _tweetsArrayController; - (void)applicationDidFinishLaunching:(NSNotification *)notification { - NSURLCache *URLCache = [[NSURLCache alloc] initWithMemoryCapacity:1024 * 1024 diskCapacity:1024 * 1024 * 5 diskPath:nil]; + NSURLCache *URLCache = [[NSURLCache alloc] initWithMemoryCapacity:4 * 1024 * 1024 diskCapacity:20 * 1024 * 1024 diskPath:nil]; [NSURLCache setSharedURLCache:URLCache]; [self.window makeKeyAndOrderFront:self];