From: Jay Freeman (saurik) Date: Thu, 2 Dec 2010 04:43:02 +0000 (-0800) Subject: Integrate SDURLCache: disk cache FTW. X-Git-Url: https://git.saurik.com/cydia.git/commitdiff_plain/e12c175e605267459d03a611abca55aab6c838b1 Integrate SDURLCache: disk cache FTW. --- diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 00000000..06bf85c9 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "SDURLCache"] + path = SDURLCache + url = git://github.com/rs/SDURLCache.git diff --git a/MobileCydia.mm b/MobileCydia.mm index 55c8bd55..c6ba06d0 100644 --- a/MobileCydia.mm +++ b/MobileCydia.mm @@ -121,6 +121,7 @@ extern "C" { #include #include "UICaboodle/BrowserView.h" +#include "SDURLCache/SDURLCache.h" #include "substrate.h" /* }}} */ @@ -8744,6 +8745,12 @@ static _finline void _setHomePage(Cydia *self) { - (void) applicationDidFinishLaunching:(id)unused { _trace(); + [NSURLCache setSharedURLCache:[[[SDURLCache alloc] + initWithMemoryCapacity:524288 + diskCapacity:10485760 + diskPath:[NSString stringWithFormat:@"%@/Library/Caches/com.saurik.Cydia/SDURLCache", @"/var/root"] + ] autorelease]]; + [CYBrowserController _initialize]; [NSURLProtocol registerClass:[CydiaURLProtocol class]]; diff --git a/SDURLCache b/SDURLCache new file mode 160000 index 00000000..9f22f02b --- /dev/null +++ b/SDURLCache @@ -0,0 +1 @@ +Subproject commit 9f22f02b13b589f9a5179d9b1251311ac20e2e6d diff --git a/makefile b/makefile index 89c43b27..168a74f0 100644 --- a/makefile +++ b/makefile @@ -56,8 +56,8 @@ clean: %.o: %.c $(cycc) -c -o $@ -x c $< -MobileCydia: MobileCydia.mm UICaboodle/*.h UICaboodle/*.mm iPhonePrivate.h lookup3.o Cytore.hpp - $(cycc) $(filter %.mm,$^) $(filter %.o,$^) $(flags) $(link) $(uikit) +MobileCydia: MobileCydia.mm UICaboodle/*.h UICaboodle/*.mm SDURLCache/SDURLCache.h SDURLCache/SDURLCache.m iPhonePrivate.h lookup3.o Cytore.hpp + $(cycc) $(filter %.mm,$^) $(filter %.o,$^) $(foreach m,$(filter %.m,$^),-x objective-c++ $(m)) $(flags) $(link) $(uikit) ldid -Slaunch.xml $@ || { rm -f $@ && false; } CydiaAppliance: CydiaAppliance.mm