Do not cache empty response data

This commit is contained in:
Brahim Hadriche committed 2025-02-03 19:34:00 -05:00
1 parent b327a37576
commit 1c4067e7da
1 file changed
+5 -1
@@ -842,6 +842,11 @@ namespace HttpClientCache
return
end if
body = ValidString(response.Text())
if body = ""
return
end if
date = CreateObject("roDateTime")
timestamp = date.AsSeconds()
@@ -857,7 +862,6 @@ namespace HttpClientCache
' {body} ' the body as is, string size matching metadata.body
jsonHeaders = FormatJson(response.Headers())
body = ValidString(response.Text())
cacheMetadata = {
timestamp: timestamp