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
wrong cache path #718
Comments
This is the default location for all electron apps: https://github.com/electron/electron/blob/master/docs/api/app.md#appsetpathname-path |
electron/electron#8124 https://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html |
Look like riot should workaround this with |
Indeed, on linux, Riot creates at least three cache directories under ~/.config/Riot: Cache, Code Cache, and GPUCache. These should be under ~/.cache/Riot instead. They're wasting space in my backup archives, and circumventing the tmpfs I use for cache filesystems. |
what is the problem to workaround the path with |
Is there any update? |
No, otherwise you would have seen it here. |
what's wrong to workaround with |
Best off asking the Electron team that, they must have a reason for not using it. |
|
Doesn't mean that |
According to electron/electron#8124 setting
|
Please read the XDG Base Dir Specification. If the variables are set the path must be derived from them. Not always is it https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html |
It doesn't make it alright. |
Yeah, but instead read the variable and only fallback if it isn't set:
(From the specification) |
They probably did not read the specification or don't care about standards. |
Comment updated, is it better now? It doesn't change anything anyway, since the main message was that it shouldn't be in |
Just because they don't read standards does not mean it has to be reproduced. $XDG_CONFIG_HOME is supposed to be a folder you can simply copy to new machines or sync to other machines. This likely breaks badly if I try to sync with other machines. |
Seems to have been solved in upstream, electron/electron#33554 has been merged and closed. |
Great! Though the PR says it "allow[s] customizing browser data location" and goes on to explain how one (i.e. electron dev) can actually use that. As such, I guess as for Element there is still something to do, i.e. actually configure it to use the "correct" locations… (still wonder why they don't use/include the proper defaults then in Electron upstream?) |
The problem seems to be that Chromium doesn't seem to want to adhere to XDGBDS and just packs everything into this single directory (1 2). So the Electron devs were only able to separate Session & User data from one and another. So Electron cannot just move these directories to $XDG_CACHE_HOME as then also Cookies & Web Storage would be stored there as well and some Electron apps store valuable data there. As an example, Trilium Notes uses its own data directory, so doesn't depend on Cookies/Web Storage, which should enable it to just treat the Electron directories as cache. Sadly for this, Element seems to use the Cookies & Web Storage and so cannot just easily separate them. |
Cache must not be stored in
~/.config/Riot/Cache
. There is~/.cache
or$XDG_CACHE_HOME
for cache.https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html
The text was updated successfully, but these errors were encountered: