I am making network calls using Alamofire and caching response in iOS app.
response is caching, but I am not able to check whether received response is from Cache or Server?
How to check the same?
I am making network calls using Alamofire and caching response in iOS app.
response is caching, but I am not able to check whether received response is from Cache or Server?
How to check the same?
You can check if there is any cached data for a request is available or not using.
if let cacheData = URLCache.shared.cachedResponse(for: request) {
// Already cached
}