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

Allow to globally specify the location of the cache dir #56

Closed
shaypal5 opened this issue May 22, 2021 · 1 comment · Fixed by #120
Closed

Allow to globally specify the location of the cache dir #56

shaypal5 opened this issue May 22, 2021 · 1 comment · Fixed by #120

Comments

@shaypal5
Copy link
Collaborator

In addition to configuring the cache file path for each wrapped function, a way to globally change the location of the general cache directory for all cachier caches is required.

A possible API:

>>> import cachier
>>> cachier.get_global_cache_dpath()
'/home/myuser/.cachier'
>>> cachier.set_global_cache_dpath('/home/opt/caches/')
>>> cachier.get_global_cache_dpath()
'/home/opt/caches/'
@NickCrews
Copy link

I wouldn't make this a priority. The current API is not that cumbersome. If this does happen, I might suggest using default instead of global (as I assume it could be overridden still). And use dir instead of dpath. So it would be get_default_cache_dir().

Alternatively, do you need the complex logic of a function or can you get away with cachier.defaut_cache_dir = "/foo"?

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

Successfully merging a pull request may close this issue.

2 participants