Closed jpm closed 13 years ago
The other obvious work around would be to call [[EGOCache currentCache] clearCache] but I don't want to remove everything, just this one object.
This issue should be resolved now in EGOImageLoader as of c8fbdaa61d6ef7114219, there's a new method called: clearCacheForURL. Hope this helps!
It's seem that [[EGOCache currentCache] clearCache] doesn't work at all. The cache is still there. The images are loaded using the cache, not downloading again after this method is called. Please consider this.
There seems to be a missing feature here somewhere related to EGOCache and EGOImageView. The use case is to force the removal of a cached image object from the system. The image itself was initially retrieved and cached with EGOImageView, but perhaps the image has been changed and the cached one is not valid anymore.
There's a handy [-EGOCache removeCacheForKey:] method which takes in a key string (image URL), but that URL doesn't match up with the internal representation of the key, since EGOImageLoader uses a static method keyForURL() to generate a better key name.
I was able to hack around this by copying the keyForURL method into my own file to get the internal version of the cache key, but that's ugly and nasty. The real fix is to provide a method to remove an image from the cache somehow.
Let me know if I'm missing something obvious here.
--Joao