-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is there an equivalent to SDWebImageRefreshCached option? #35
Comments
Hi, @rainypixels Yes, Kingfisher's Thanks! |
@rainypixels Fixed in #42 . I decided to leave the handling detail to framework users and this wiki explained how to implement it with Kingfisher. Please let me know if it works for you or not. Thanks! |
@onevcat Apologies! I've been heads down working on my code, so I just saw this. First off, thanks for looking into this feature request so quickly! Much appreciated. As I understand it (from your latest check-in and the wiki), you've modified Kingfisher to support downloading and caching, but its up to the framework users to manage caching/storing eTags, and passing them along to the server whenever necessary. Your wiki is very clear, and the solution you're proposing is elegant. Let me address your question:
I have a few concerns:
Finally: will this work for me? Honestly, I'm not entirely sure yet. I'm very careful about the dependencies I take, and the above issues are legitimate concerns for me. For instance, I am definitely in the group seeking a turnkey solution that doesn't even have to worry about managing a cache. But, again, it's too early for me to tell. Fortunately, I'm probably 6-8 weeks from having to worry about an image download/caching solution, so I don't have to make the decision now. All that said, I truly appreciate your response and the effort (both for the check-in and the wiki)! I'll continue watching this space. :-) |
Hi, @rainypixels Thanks for the reply.
|
Makes sense on all fronts. I shall continue noodling on this in the meantime. I may have the need to take a generic caching solution dependency in any case, so I might just end up rolling with Kingfisher because I solidly support this sentiment:
Maybe I'll even end up forking and sending you a pull request for a turnkey solution. I should know where I stand in time. Thanks, again! |
Thanks for your kind words and effort. |
this fromMemoryCacheOrRefresh not work for me .. still give me first cache image even if its changed |
Does Kingfisher have a
KingfisherOptionsInfo
option (or a plan to add one) that's an equivalent to SDWebImage'sSDWebImageRefreshedCached
option?At first glance I thought
ForceRefresh
was the answer. But looking at your docs, that doesn't seem to be the case. It seems likeForceRefresh
always loads the image from the Web while SDWebImage'sSDWebImageRefreshedCached
instead checks the HTTP caching control headers and honors them, i.e. the image is loaded from the Web when, say, the server doesn't return a304-Not-Modified
, otherwise it's pulled from the cache. The scenario this enables (new image, same url) is pretty common there days; my upcoming app relies on it as well.Thanks for this library, btw. :) Very timely and much needed since there's really nothing that's pure Swift-based yet.
The text was updated successfully, but these errors were encountered: