john-kurkowski / tldextract

Accurately separates a URL’s subdomain, domain, and public suffix, using the Public Suffix List (PSL).
BSD 3-Clause "New" or "Revised" License
1.81k stars 211 forks source link

Fix incorrect namespace used for caching function returns #258

Closed nicholas-plutoflume closed 2 years ago

nicholas-plutoflume commented 2 years ago

This PR fixes #257.

Currently, the namespace is not passed to the function that sets the cache, and instead the literal "urls" is passed. As a result, non-url related functions, such as the function to cache the public suffixes were not cached.

This PR fixes this by using the namespace argument which is passed in to the run_and_cache function, and adds a regression test.

john-kurkowski commented 2 years ago

(Rebased)

john-kurkowski commented 2 years ago

Thanks for the thorough PR and discussion!