You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 15, 2019. It is now read-only.
This causes problems with long image URLs, because "hash" method of NSString only uses 96 characters to generate the hash (first 32, last 32 and middle 32). Basically if your URLs are over 96 chars in length, there is a good chance of getting the same cacheKey for two different URLs. I run into this problem because I had a bunch of long, similar URLs where the only difference was the product id (starting at char 39).
In "FSImageLoader.m" on line 79 [NSString hash] method is used to create a cache key:
This causes problems with long image URLs, because "hash" method of NSString only uses 96 characters to generate the hash (first 32, last 32 and middle 32). Basically if your URLs are over 96 chars in length, there is a good chance of getting the same cacheKey for two different URLs. I run into this problem because I had a bunch of long, similar URLs where the only difference was the product id (starting at char 39).
This article describes the problem in detail.
Would it be possible to use a more robust hash function? Here is an implementation using MD5 hash:
The text was updated successfully, but these errors were encountered: