Skip to content

Commit

Permalink
remove parsed address cache (#43)
Browse files Browse the repository at this point in the history
  • Loading branch information
plally authored Sep 16, 2023
1 parent ceda1eb commit fdcf19a
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions lua/cfc_http_restrictions/shared/url.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit fdcf19a

Please sign in to comment.