Skip to content
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

--cache-dir should be optional and have a default #9

Open
jbfaden opened this issue Nov 21, 2024 · 2 comments
Open

--cache-dir should be optional and have a default #9

jbfaden opened this issue Nov 21, 2024 · 2 comments

Comments

@jbfaden
Copy link
Contributor

jbfaden commented Nov 21, 2024

The --cache-dir argument is presently required, but I think it should have a default value. It's already a fairly long command line, and having a default encourages a standard place so that different codes will be more likely to use the same cache.

I suggest <user_home>/hapi-cache/, so that it is transparent what is going on.

@rweigel
Copy link
Collaborator

rweigel commented Nov 21, 2024

Also consider that Python has a function that uses the os tmpdir. I usually use that as default and show it when help is shown and print it when --verbose is used.

The pattern of using the home dir as default is unconventional (if all programs did it, home dirs would have 10-100 dirs). Maybe research what database programs do.

Most OSs have a special directory, such as ~/Library/Caches on OS-X. See also https://mkyong.com/java/how-to-get-the-temporary-file-path-in-java/.

@jbfaden
Copy link
Contributor Author

jbfaden commented Nov 21, 2024

There's ~/.cache on Linux, too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants