-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Please support accessing an offline version of the list #2
Comments
This library has always supported accessing an offline version of the list as well as pulling the list from arbitrary URLs. See List::from_path and List::from_url methods. In fact, List::fetch simply calls What we don't do is ship with any offline version. This is a deliberate decision. The public suffix list is a living document which receives updates frequently. Some people actually use it to check if a domain is valid. If they base their information from an ancient version of the list they are bound to get incorrect results. Users should be able to make informed decisions about caching strategies for their particular use case.
By using the aforementioned Please note that #1 has since been fixed. Thank you for your interest in this library. |
Would you consider adding a feature flag that crates depending on this could disable, then, to disable the corresponding dependencies and the support for |
@joshtriplett I like this idea. I'm working on it right now. Will ship shortly. Thanks! |
@joshtriplett This is now possible in |
@joshtriplett In case you are interested, the latest version, |
@rushmorem Thanks! I'd wondered about a |
@joshtriplett My pleasure :) I'm glad you like it. |
@joshtriplett You may also be interested in the new psl crate that caches the list offline but also automatically downloads an updated one if the one you currently have is too old. By default, it downloads a new copy every week but you can change the duration to anything you want. |
Some other implementations of the public suffix list use (and share) an offline version of the list. For instance, libpsl, Python's publicsuffix, Perl's Domain::PublicSuffix, and Haskell's publicsuffixlist all use the same shared copy, packaged in Debian as publicsuffix.
Please consider supporting the use of a shared copy on the system. You might also support falling back to a compiled-in version (perhaps provided in a separate crate to avoid having to update this one too frequently). And then, for anyone who wants to download the list themselves and keep it updated, you can provide a URL as a constant, and let callers download that using whatever HTTP library they already use and provide its contents. (That would also avoid having to deal with caching policies within this library.)
This would also address issue #1.
The text was updated successfully, but these errors were encountered: