You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was debugging an issue I have with images no caching correctly (likely due to size or cookies?) and it got me going through the code.
Could you point me to where the caching occurs? I only see one storeCachedResponse that in my case never gets triggered because there aren't any redirects.
Does the session automatically do it in this line: let (data, _, metrics) = try await session.data(for: request)? I was under the likely incorrect impression we had to explicitly call storeCachedResponse.
The text was updated successfully, but these errors were encountered:
I've tried to remove metrics.redirectCount > 0 and it started entering this section of the code. But it still actually loads an image on appear. I mean, it shows the image, but at the same time makes a network request and downloads an image.
Maybe add something like
if case .success(_) = phase { return }
within load()
With such a piece of code and with metrics.redirectCount > 0 removed it became working as expected
First off, amazing work! Thanks 馃檹
I was debugging an issue I have with images no caching correctly (likely due to size or cookies?) and it got me going through the code.
Could you point me to where the caching occurs? I only see one
storeCachedResponse
that in my case never gets triggered because there aren't any redirects.Does the session automatically do it in this line:
let (data, _, metrics) = try await session.data(for: request)
? I was under the likely incorrect impression we had to explicitly callstoreCachedResponse
.The text was updated successfully, but these errors were encountered: