seatgeek / SGImageCache

A flexible image caching library for image rich iOS applications
BSD 2-Clause "Simplified" License
401 stars 36 forks source link

FOLDER_NAME #20

Open mnatha opened 9 years ago

mnatha commented 9 years ago

SGImageCache subclass references superclass' FOLDER_NAME when trying to access cached image file. They are inconsistent so the cached file is never returned.

sobri909 commented 9 years ago

@mnatha The superclass's define of FOLDER_NAME isn't visible (it's in the .m), so SGImageCache will only ever get the value from its own define.

staminajim commented 9 years ago

They are inconsistent so the cached file is never returned.

@mnatha Do you have an example of how to trigger this behaviour?

mnatha commented 9 years ago

I was noticing that when offline, I wouldn't see the images that I expected to be cached. So I found my way to - (NSString *)pathForCacheKey:(NSString *)cacheKey and put a breakpoint in there. This is where I found that cachePath included the folder name equal to what is set in SGCache.m.