mirror of
https://github.com/CFC-Servers/cfc_cl_http_whitelist.git
synced 2025-03-04 03:03:18 -05:00
remove parsed address cache
This commit is contained in:
parent
ceda1ebc83
commit
5f2866c2c4
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user