remove parsed address cache (#43)

This commit is contained in:
Pierce Lally 2023-09-16 13:29:24 -04:00 committed by GitHub
parent ceda1ebc83
commit fdcf19a1a3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -59,18 +59,11 @@ function CFCHTTP.ReplaceURLs( text, f )
return html
end
---@type table<string, string>
local parsedAddressCache = {}
---@param url string
---@return string|nil
function CFCHTTP.GetAddress( url )
if not url then return end
local cached = parsedAddressCache[url]
if cached then return cached end
local data = CFCHTTP.ParseURL( url )
parsedAddressCache[url] = data.address
return data.address
end