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

php - Vagrant up error - Uncaught Reflection Exception: Class DOMDocument does not exist -

vue.js - Create hooks for automated testing -

Add new key value to json node in java -