TumblrArchive / TMCache

Fast parallel object cache for iOS and OS X.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

diskByteCount value not correct after removing object from cache

fvisticot opened this issue · comments

After taking a look in the code it seems a "+" needs to be removed by "-"

  • (BOOL)removeFileAndExecuteBlocksForKey:(NSString *)key
    {

before:
self.byteCount = _byteCount + [byteSize unsignedIntegerValue]; // atomic

should be:
self.byteCount = _byteCount - [byteSize unsignedIntegerValue]; // atomic

Well that's embarrassing. Update coming today, I will roll this in.

Fixed in 1.2.0