AlamofireURLCache
AlamofireURLCache copied to clipboard
Can you please explain more precisely what refreshCache does?
I tried to have a look at the code but I don't understand exactly what refreshCache does when it is set to true. I expected it to return cache data and then call the request anyway to refresh the cache and return the response again to the UI, but it does not seem to be happening. When is the cache refreshed?
If refershCache=true, it will force to update the cached data (request new data from the server, regardless of whether the cache is expired), if refreshCache=false, the new data will be request only when the cache expires
OK, so when refreshCache is true, when is the data requested from the server? For example, if I am making a request with refreshCache=true and the data I'm request is already in cache, do I get the cached data and then Alamofire is requesting the data to refresh the cache behind the scenes so that I can get it on the next call? Or does Alamofire ignore the cached version, loads data from the server, refreshes the cache and return the data to me? Or does it return both?
I have the same question