TMDiskCache's enumerateObjectsWithBlock doesn't return objects
iwasrobbed opened this issue · 1 comments
iwasrobbed commented
In the implementation for enumerateObjectsWithBlock:completionBlock:
, the expanded TMDiskCacheObjectBlock
is explicitly returning nil
when enumerating over the keys, so effectively this enumerateObjects.. method is just for returning keys and file URLs, but no objects.
for (NSString *key in keysSortedByDate) {
NSURL *fileURL = [strongSelf encodedFileURLForKey:key];
// Where block arguments are:
// TMDiskCache *cache, NSString *key, id <NSCoding> object, NSURL *fileURL
block(strongSelf, key, nil, fileURL);
}
Is there a reason for doing this or should this enumeration method be renamed if it was intended to only be used for keys?
brianmichel commented
Hmm, this seems odd, however TMCache is no longer in active maintenance, please see here for an alternative to satisfy your needs.