summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitmodules3
-rw-r--r--MobileCydia.mm7
m---------SDURLCache0
-rw-r--r--makefile4
4 files changed, 12 insertions, 2 deletions
diff --git a/.gitmodules b/.gitmodules
new file mode 100644
index 0000000..06bf85c
--- /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 55c8bd5..c6ba06d 100644
--- a/MobileCydia.mm
+++ b/MobileCydia.mm
@@ -121,6 +121,7 @@ extern "C" {
#include <Cytore.hpp>
#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
+Subproject 9f22f02b13b589f9a5179d9b1251311ac20e2e6
diff --git a/makefile b/makefile
index 89c43b2..168a74f 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