-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Allow creating a ASPINRemoteImageDownloader that ignores caches #12
Allow creating a ASPINRemoteImageDownloader that ignores caches #12
Conversation
Phil Larson seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |
@plarson to continue the conversation here, would it be better to expose the sessionManager instead of adding this option? |
@garrettmoon Exposing session manager would be helpful for adding custom HTTP headers. For the caching issue, it seems to me that the best way is specifying It's checked in Clearing the cache for a URL before setting it on If the only way is removing the URL explicitly from the cache, then maybe |
In my opinion it might be options/flags added to |
Generated by 🚫 Danger |
I'm in favor of providing more control to users of ASNetworkImageNode, in terms of caching behavior. So a config object / struct should be considered, although we might want to have it set at a class level rather than an instance level. Among the parameters that would be useful to configure are properties on the PINDiskCache, like byteLimit. But also, I definitely agree we should make it easier to decouple from these frameworks and run without caching, etc. |
@garrettmoon any thoughts on the best way to support this? |
I feel like the underlying issue is that it's not straightforward to subclass ASPINRemoteImageManager. If we could make that easier we'd be able to support many more scenarios? |
@garrettmoon Yes, that could be helpful. I think there is probably a small number of knobs that should exist without subclassing, though; in particular, if there were only one, turning off the cache is likely to be the most common. I've seen a number of cases where PINCache is linked for other usages in an app, but a disk cache is not desired (or in fact allowed, due to it not handling server-specified expiry policies). Any more specific guidance for the author of this PR? If you have thoughts on how we could make the subclassing option easy and clean and allow cache disabling as part of that, it would definitely be a step forward from today. |
Note: #747 provides a great place to specify your custom image manager. |
Note: #1124 makes it easy to specify a custom, preconfiged image manager. |
Based on the last 2 comments, I suppose we can close this old PR. Please feel free to reopen/open a new one if need to. Thank you all. |
Moving this change from facebookarchive/AsyncDisplayKit#3257