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

site_cache_dir? #77

Closed
thorsummoner opened this issue Sep 20, 2016 · 3 comments
Closed

site_cache_dir? #77

thorsummoner opened this issue Sep 20, 2016 · 3 comments

Comments

@thorsummoner
Copy link

I may be mistaken but isn't there a site cache directory on most systems too? Specifically interested in FHS compliant systems, isn't it /var/cache/ ?

@Hacklin
Copy link

Hacklin commented Jul 15, 2017

No, there is no /var/cache/ .
Just use /var/tmp/ for site_cache_dir.
Like ~/.cache/ the system's /var/tmp/ will survive a reboot.

For inter-process communication (lock files, named pipes, sockets)
you should use XDG_RUNTIME_DIR and fall back to /tmp/ .
XDG_RUNTIME_DIR and /tmp/ may reside in memory and
you must_not place larger files in there.

@efiop
Copy link

efiop commented Mar 2, 2023

It would still be great to have site_cache_dir to standardize it code-wise for all platforms. Windows one doesn't seem obvious at all.

@efiop
Copy link

efiop commented Mar 3, 2023

If someone else will be looking for this: platformdirs (appdirs fork) now has site_cache_dir tox-dev/platformdirs#145

efiop added a commit to efiop/platformdirs that referenced this issue Mar 10, 2023
Turns out `/var/cache` might be non-writable by regular users (e.g. on ubuntu),
so we are better off using `/var/tmp` which is and it is what was suggested in
original appdirs discussion in ActiveState/appdirs#77
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

3 participants