Do not cache empty response data
This commit is contained in:
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
|
||||
|
||||
Reference in new issue
Block a user