Skip to content

Instantly share code, notes, and snippets.

@caa-aws
Created November 28, 2012 03:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save caa-aws/4158838 to your computer and use it in GitHub Desktop.
Save caa-aws/4158838 to your computer and use it in GitHub Desktop.
@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