ios - SDWebImageView Cache issue when offline and with percent escaped URLs -
i using sdwebimage
display images asynchronously, , cache them, them when in offline mode.
i having issue sdwebimagedownloader
, uiimageview+webcache
cache when using offline mode, , issue appears when dealing percent escaped urls, have special characters '{'.
in online mode works fine, in offline mode images urls containing percent escapes not loaded
[myimageview setimagewithurl:[urlimage percentescapedurl] completed:^(uiimage *image, nserror *error, sdimagecachetype cachetype) { //image here loaded in offline mode if url not need percent escapes }];
the same issue sdwebimagedownloader
.
i tried debug sdimageview
behaviour, , seems it's using ios sdk nscachedurlresponse
behaviour.
i testing https://github.com/rs/sdwebimage/ ios 7.0
any 1 has got same issue? workaround?
sdwebimage has property declared in sdwebimagemanager.h
:
@property (strong) nsstring *(^cachekeyfilter)(nsurl *url);
there description of property corresponding file:
/** * cache filter block used each time sdwebimagemanager need convert url cache key. can * used remove dynamic part of image url. * * following example sets filter in application delegate remove query-string * url before use cache key: * * @code [[sdwebimagemanager sharedmanager] setcachekeyfilter:^(nsurl *url) { url = [[nsurl alloc] initwithscheme:url.scheme host:url.host path:url.path]; return [url absolutestring]; }]; * @endcode */
i think can try changes in corresponding code.
Comments
Post a Comment