tldextract icon indicating copy to clipboard operation
tldextract copied to clipboard

Could you protect cache file against lib updates ?

Open vaab opened this issue 7 years ago • 1 comments

I have to manually check version of tldextract to delete the file when tldextract is updated. What is the rationale of not doing this on the tldextract side ? (by storing the version of tldextract in the cache file, and simply removing the file and replace it if it doesn't match current version).

Providing this mecanism externally seems really odd to me : I'd like to keep the cache if usable, I'm ready to make the script that will update it automatically every X elapsed time. But in current situation, it seems I have to also check that the cache is usable by tldextract.

What are your thoughts on this topic ?

vaab avatar Sep 04 '18 15:09 vaab

this is a good point.

there is already a somewhat related PR open here: https://github.com/john-kurkowski/tldextract/pull/144

that one is not merge-ready but it would take care of several improvements to the caching behavior (both when you leave the cache file unconfigured/ default, and when you are using custom cache path)


you are encouraged to control your own cache file -- see docs here:

https://github.com/john-kurkowski/tldextract#note-about-caching

that will take care of your issue regardless of when the other PR is merged

floer32 avatar Mar 04 '19 00:03 floer32