From: Jay Freeman (saurik) Date: Mon, 21 Mar 2011 00:50:00 +0000 (-0700) Subject: Don't use HTTP disk cache on < 3.2. X-Git-Tag: v1.1.0%rc1~65 X-Git-Url: https://git.saurik.com/cydia.git/commitdiff_plain/93ef74bb87c6be4e4e00399af519d24630653712?ds=inline Don't use HTTP disk cache on < 3.2. --- diff --git a/MobileCydia.mm b/MobileCydia.mm index 2b16ee26..3e1b6846 100644 --- a/MobileCydia.mm +++ b/MobileCydia.mm @@ -9739,11 +9739,13 @@ _trace(); [BridgedHosts_ addObject:[[NSURL URLWithString:CydiaURL(@"")] host]]; } - [NSURLCache setSharedURLCache:[[[CYURLCache alloc] - initWithMemoryCapacity:524288 - diskCapacity:10485760 - diskPath:[NSString stringWithFormat:@"%@/Library/Caches/com.saurik.Cydia/SDURLCache", @"/var/root"] - ] autorelease]]; + // on 3.[01], CFURLCacheResponse is backed by NSURLCacheResponse, and vice versa: fail + if (kCFCoreFoundationVersionNumber >= kCFCoreFoundationVersionNumber_iPhoneOS_3_2) + [NSURLCache setSharedURLCache:[[[CYURLCache alloc] + initWithMemoryCapacity:524288 + diskCapacity:10485760 + diskPath:[NSString stringWithFormat:@"%@/Library/Caches/com.saurik.Cydia/SDURLCache", @"/var/root"] + ] autorelease]]; [CydiaWebViewController _initialize];