-
Notifications
You must be signed in to change notification settings - Fork 361
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Don't wait for all metadata to access any item from TTL cache #228
Conversation
…ects from TTL cache
…lizeDiskProperties]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@wiseoldduck thanks for this contribution! This looks great. Mind addressing the minor comments and I'll merge?
Source/PINDiskCache.m
Outdated
[self unlock]; | ||
[self lockAndWaitForKnownState]; | ||
if (!_diskStateKnown) { | ||
if (_metadata[key]== nil) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: add a space after ]
Source/PINDiskCache.m
Outdated
} | ||
|
||
- (void)_locked_initializeDiskPropertiesForFile:(NSURL *)fileURL fileKey:(NSString *)fileKey byteCount:(NSUInteger *)pByteCount { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: extra space
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where what?
Source/PINDiskCache.m
Outdated
return resourceKeys; | ||
} | ||
|
||
- (void)_locked_initializeDiskPropertiesForFile:(NSURL *)fileURL fileKey:(NSString *)fileKey byteCount:(NSUInteger *)pByteCount { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it be better to just return byteCount?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably, although it's a little less obvious what it is
Whitespace, return fileSize from _locked_initializeDiskPropertiesForFile instead of taking a NSUInteger *param
Awesome, thanks again! |
No description provided.