-
-
Notifications
You must be signed in to change notification settings - Fork 526
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
question: Why is cancelRequest
tied to Manager
?
#142
Comments
Hey!
It continued working fine because of to the implementation details (
I've added those top-level functions a while ago simply because I saw Alamofire do the same thing (I'm a bit older and a bit wiser now). There are a lot of reasons why this was a bad idea. If I ever get to release Nuke 6, I would definitely remove those, should've done this a while ago. There are almost 0 benefits in having them, and plenty of drawbacks.
There have been a lot of plans for improving and extending Nuke, but I simple don't have enough time and motivation to do that right now. I do use Nuke, Nuke+Alamofire and RxNuke (but not other plugins) at my current job though. As soon as I need more features (e.g. progress reporting), I'll probably revisit it. For now, it's in maintenance mode unfortunately. I spend all my free time on Yalta and articles. |
Removed in Nuke 6 (WIP). |
I've been using Nuke, and recently have been trying to use DFCache with it. I have no issues with that, but in doing so, it means that I shouldn't be calling
loadImage
anymore. This is because I need to create my own instance ofManager
, that knows about DFCache. Fair enough.So, I went through my code to start calling
CachedNukeManager.loadImage
, which works fine. So, then I looked atNuke.swift
and noticed thatcancelRequest
is a top-level function just likeloadImage
. So, I figured, I should go through my code and rewrite calls to it asCachedNukeManager.cancelRequest
. But after looking at whatcancelRequest
does, I'm not sure why it's an instance method ofManager
, because it only accessesstatic
routines.I can still change my code over to call
CachedNukeManager.cancelRequest
, but it seems I don't need to. Is there a plan forManager
to do more here? If not, shouldcancelRequest
just be a public static function?The text was updated successfully, but these errors were encountered: