Created
November 28, 2012 03:19
-
-
Save caa-aws/4158838 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@interface NSURLCacheEx : NSURLCache { | |
} | |
+ (NSURLCacheEx *)sharedURLCache; | |
- (void)setMemoryCapacity:(NSUInteger)memCap; | |
- (int)memoryCapacity; | |
@end | |
@implementation NSURLCacheEx | |
+ (NSURLCacheEx *)sharedURLCache | |
{ | |
return (NSURLCacheEx *)[super sharedURLCache]; | |
} | |
-(void)setMemoryCapacity:(NSUInteger)memCap | |
{ | |
DBGNSLOG(@"setMemoryCapacity %d", memCap); | |
if (memCap == 0) | |
return; | |
[super setMemoryCapacity:memCap]; | |
} | |
-(int)memoryCapacity | |
{ | |
int mc = [super memoryCapacity]; | |
DBGNSLOG(@"memoryCapacity %d", mc); | |
return mc; | |
} | |
@end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment