ios - SDWebImage won't cache images -


i using sdwebimage download images stored @ s3 server asynchronous. have add authentication tokens headers each image, cannot use sdwebimagemanager.shared().imagedownloader. because being singleton property requires headers unique each request.

hence have used separate sdwebimagedownloader each tableview cell. upto point works fine. no image getting cached.

following code using

 imagedownloader.downloadimage(with: url, options: sdwebimagedownloaderoptions.usensurlcache, progress: nil) { (image, _, error, completed) in      if completed {             if error != nil {                 print(error?.localizeddescription ?? "some error")             } else {                 self.imgpromotion.image = image             }         }    } 

have tried add cache using sdwebimagemanager.shared().saveimage(tocache: image!, for: url) doesn't case.

what doing wrong here?


Comments

Popular posts from this blog

service - Android MediaPlayer calls onCompletion before it already finished -

javascript - Training Neural Network to play flappy bird with genetic algorithm - Why can't it learn? -

javascript - Create a stacked percentage column -