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

Use .cache/PROPOSAL/ for proposal tables and create directory #61

Open
maxnoe opened this issue Feb 25, 2020 · 2 comments
Open

Use .cache/PROPOSAL/ for proposal tables and create directory #61

maxnoe opened this issue Feb 25, 2020 · 2 comments

Comments

@maxnoe
Copy link
Member

maxnoe commented Feb 25, 2020

Proposal uses $HOME/.local/share/PROPOSAL/tables for interpolation tables.
Currently, the user has to create this directory to enable table creation.

I think it would be better to use $HOME/.cache/PROPOSAL as it would fit better for this purpose and to automatically create this, if it does not exist.

@Jean1995
Copy link
Member

What would be an appropriate default value if the user does not define a folder to save the interpolation tables?

On our development branch, the tables are built to /tmp.
One could also argue that per default, the tables should be built only inside the memory and not be saved to a file at all (similar to the treatment in old PROPOSAL versions).

@maxnoe
Copy link
Member Author

maxnoe commented Feb 10, 2021

~/.cache/proposal is the correct location for cached things. And since it is highly likely a user will run proposal more than twice, it is very valid to use a file cache by default.

You have to make sure that cache is correctly invalidated though, e.g. by including version and other needed information in the filenames.

And maybe a function like clear_cache would be good just for convenience.

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

No branches or pull requests

2 participants