mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-23 09:04:13 +00:00
GSFileURLHandle: Expose internal cache
This commit is contained in:
parent
e1fcc2db35
commit
a127d4ee75
1 changed files with 8 additions and 2 deletions
|
@ -53,7 +53,8 @@
|
|||
BOOL _didLoad;
|
||||
}
|
||||
|
||||
- (void) _setFileCacheSize: (NSUInteger) size;
|
||||
+ (void) _setFileCacheSize: (NSUInteger) size;
|
||||
+ (NSCache *) _fileCache;
|
||||
@end
|
||||
|
||||
/**
|
||||
|
@ -612,11 +613,16 @@ static Class NSURLHandleClass = 0;
|
|||
static NSCache *fileCache = nil;
|
||||
static NSUInteger defaultCacheSize = 4 * 1024 * 1024;
|
||||
|
||||
- (void) _setFileCacheSize: (NSUInteger) size
|
||||
+ (void) _setFileCacheSize: (NSUInteger) size
|
||||
{
|
||||
[fileCache setTotalCostLimit: size];
|
||||
}
|
||||
|
||||
+ (NSCache *) _fileCache
|
||||
{
|
||||
return fileCache;
|
||||
}
|
||||
|
||||
+ (NSURLHandle*) cachedHandleForURL: (NSURL*)url
|
||||
{
|
||||
NSURLHandle *obj = nil;
|
||||
|
|
Loading…
Reference in a new issue