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
|
return
|
||||||
end if
|
end if
|
||||||
|
|
||||||
|
body = ValidString(response.Text())
|
||||||
|
if body = ""
|
||||||
|
return
|
||||||
|
end if
|
||||||
|
|
||||||
date = CreateObject("roDateTime")
|
date = CreateObject("roDateTime")
|
||||||
timestamp = date.AsSeconds()
|
timestamp = date.AsSeconds()
|
||||||
|
|
||||||
@@ -857,7 +862,6 @@ namespace HttpClientCache
|
|||||||
' {body} ' the body as is, string size matching metadata.body
|
' {body} ' the body as is, string size matching metadata.body
|
||||||
|
|
||||||
jsonHeaders = FormatJson(response.Headers())
|
jsonHeaders = FormatJson(response.Headers())
|
||||||
body = ValidString(response.Text())
|
|
||||||
|
|
||||||
cacheMetadata = {
|
cacheMetadata = {
|
||||||
timestamp: timestamp
|
timestamp: timestamp
|
||||||
|
|||||||
Reference in new issue
Block a user