summaryrefslogtreecommitdiff
path: root/CyteKit/Application.mm
diff options
context:
space:
mode:
authorJay Freeman (saurik) <saurik@saurik.com>2017-02-16 01:30:53 -0800
committerJay Freeman (saurik) <saurik@saurik.com>2017-02-16 01:30:53 -0800
commita3d01a768f0e7f9d5a36b4bcea04458634818863 (patch)
treea3e62c81f8cf286cabe0bdf382c95caaf0722d0d /CyteKit/Application.mm
parent68df8c0b7bacec286d4798408b5a110bdac88986 (diff)
Move a bunch of clearly shared logic into CyteKit.
Diffstat (limited to 'CyteKit/Application.mm')
-rw-r--r--CyteKit/Application.mm7
1 files changed, 7 insertions, 0 deletions
diff --git a/CyteKit/Application.mm b/CyteKit/Application.mm
index 9bd42ff..77b1260 100644
--- a/CyteKit/Application.mm
+++ b/CyteKit/Application.mm
@@ -25,6 +25,7 @@
#include <UIKit/UIKit.h>
#include "CyteKit/Application.h"
+#include "CyteKit/URLCache.h"
#include "iPhonePrivate.h"
#include <Menes/ObjectHandle.h>
@@ -57,6 +58,12 @@
if ([self respondsToSelector:@selector(setApplicationSupportsShakeToEdit:)])
[self setApplicationSupportsShakeToEdit:NO];
+
+ [NSURLCache setSharedURLCache:[[[CyteURLCache alloc]
+ initWithMemoryCapacity:524288
+ diskCapacity:10485760
+ diskPath:[NSString stringWithFormat:@"%@/%@/%@", NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES).firstObject, NSBundle.mainBundle.bundleIdentifier, @"SDURLCache"]
+ ] autorelease]];
}
@end