The point is in the sdwebimagemanager.m file, about 176 lines
On the basis of (using sdwebimagerefreshcached), modify the SD library
if (Image && options & sdwebimagerefreshcached) {//progressive off if image already cached but forced Refreshing
downloaderoptions &= ~sdwebimagedownloaderprogressivedownload;
//Ignore image read from Nsurlcache if image if cached but force
refreshing downloaderoptions |= sdwebimagedownloaderignorecachedresponse;< c3/>}
Add this section of code//Remove Sdwebimagedownloaderusensurlcache flag downloaderoptions &= ~sdwebimagedownloaderusensurlcache;
if (Image && options & sdwebimagerefreshcached) {//progressive off if image already cached but forced refreshing downloaderoptions &= ~sdwebimagedownloaderprogressivedownload; Yes, that's it.//Ignore image read from Nsurlcache if image if cached and force refreshing downloaderoptions |= Sdwebimagedownlo Aderignorecachedresponse;}
Author: Yang Prawn
Links: https://www.jianshu.com/p/3c95baccaf61
Source: Pinterest
Copyright belongs to the author. Commercial reprint please contact the author for authorization, non-commercial reprint please specify the source. if (Image && options & sdwebimagerefreshcached) {//progressive off if image already cached but forced refreshing downloaderoptions &= ~sdwebimagedownloaderprogressivedownload; Yes, that's it.//Ignore image read from Nsurlcache if image if cached and force refreshing downloaderoptions |= Sdwebimagedownlo Aderignorecachedresponse;}
Author: Yang Prawn
Links: https://www.jianshu.com/p/3c95baccaf61
Source: Pinterest
Copyright belongs to the author. Commercial reprint please contact the author for authorization, non-commercial reprint please specify the source. if (Image && options & sdwebimagerefreshcached) {//progressive off if image already cached but forced refreshing downloaderoptions &= ~sdwebimagedownloaderprogressivedownload; Yes, that's it.//Ignore image read from Nsurlcache if image if cached and force refreshing downloaderoptions |= Sdwebimagedownlo Aderignorecachedresponse;}
Author: Yang Prawn
Links: https://www.jianshu.com/p/3c95baccaf61
Source: Pinterest
Copyright belongs to the author. Commercial reprint please contact the author for authorization, non-commercial reprint please specify the source. if (Image && options & sdwebimagerefreshcached) {//progressive off if image already cached but forced refreshing downloaderoptions &= ~sdwebimagedownloaderprogressivedownload; Yes, that's it.//Ignore image read from Nsurlcache if image if cached and force refreshing downloaderoptions |= Sdwebimagedownlo Aderignorecachedresponse;}
Author: Yang Prawn
Links: https://www.jianshu.com/p/3c95baccaf61
Source: Pinterest
Copyright belongs to the author. Commercial reprint please contact the author for authorization, non-commercial reprint please specify the source.
if (Image && options & sdwebimagerefreshcached) {//progressive off if image already cached but forced Refreshing
downloaderoptions &= ~sdwebimagedownloaderprogressivedownload;
Yes, that's it.//Ignore image read from Nsurlcache if image if cached and force refreshing downloaderoptions |= Sdwebimagedo
Wnloaderignorecachedresponse;
}
At last
if (Image && options & sdwebimagerefreshcached) {//progressive off if image already cached but forced Refreshing
downloaderoptions &= ~sdwebimagedownloaderprogressivedownload;
//Remove Sdwebimagedownloaderusensurlcache flag
downloaderoptions &= ~sdwebimagedownloaderusensurlcache;//Ignore Image read from Nsurlcache if image if cached but force
refreshing downloaderoptions |= Sdwebimagedownloaderignorecach Edresponse;
}
The second workaround is to change the "extra header" to achieveiOS development ~sdwebimage is how to do URL unchanged, update the content of the picture