ios - NSURLSession ignoring NSURLSessionConfiguration Cache Policy -
even after setting cache policy, nsurlsession
still loading cached data:
let url = nsurl(string: urlstring); var sessionconfig = nsurlsessionconfiguration.defaultsessionconfiguration(); sessionconfig.requestcachepolicy = nsurlrequestcachepolicy.reloadignoringlocalandremotecachedata; var session = nsurlsession(configuration: sessionconfig);
is there reason why session ignoring .reloadignoringlocalandremotecachedata
?
from nsurlrequest class reference page
nsurlrequestreloadignoringlocalandremotecachedata = 4, // unimplemented nsurlrequestreloadrevalidatingcachedata = 5 // unimplemented
i guess, constant there should not used.
Comments
Post a Comment