diff --git a/docs/ConditionalRefresh.md b/docs/ConditionalRefresh.md index e4bccdd8..1b5de7ed 100644 --- a/docs/ConditionalRefresh.md +++ b/docs/ConditionalRefresh.md @@ -59,14 +59,14 @@ var product = await cache.GetOrSetAsync( using var resp = await client.SendAsync(req, ct); - resp.EnsureSuccessStatusCode(); - if (resp.StatusCode == HttpStatusCode.NotModified) { // NOT MODIFIED -> RETURN STALE VALUE return ctx.NotModified(); } + resp.EnsureSuccessStatusCode(); + // NORMAL RESPONSE: SAVE ETAG + RETURN VALUE return ctx.Modified( await resp.Content.ReadFromJsonAsync(),