zeal icon indicating copy to clipboard operation
zeal copied to clipboard

Consider installing docsets into `$XDG_CACHE_DIR` (`~/.cache`)

Open intelfx opened this issue 1 year ago • 2 comments

On Linux, Zeal apparently extracts docsets into a subdirectory under ~/.local/share. As docsets are in their nature "expendable" (i. e. merely a local copy of content available elsewhere), consider installing them into ~/.cache instead. Additionally, consider creating a CACHEDIR.TAG in the docset directory.

This might save bandwidth and/or disk space for users who perform backups of their data -- ~/.cache would normally be excluded.

(This probably requires explicitly storing the list of installed docsets elsewhere, so that the list itself would be preserved in case of a cache purge event.)

intelfx avatar Oct 14 '23 00:10 intelfx

As docsets are in their nature "expendable" (i. e. merely a local copy of content available elsewhere)

This is only true for a machine that can depend on constant network connectivity - this is situational and use case specific. Storing docsets in $XDG_CACHE_DIR indicates to the desktop environment that the docset may be pruned at any time - which, for a user whose machine isn't connected to the internet, will render Zeal essentially useless when the cache is cleared.

The Freedesktop spec states that $XDG_CACHE_HOME is used for "user-specific non-essential data files" - I would argue that the availability of docsets (both online and offline) is essential to the usage of Zeal, given that its description is "an offline documentation browser".

Consider also the extra bandwidth that would be required to retrieve the docsets every time there is a cache purge event.


Consider excluding ~/.local/share/Zeal from your backups instead.

jthvai avatar Oct 26 '23 06:10 jthvai

The folder where docsets are stored is also configurable in the settings:

image

FichteFoll avatar Dec 14 '23 19:12 FichteFoll

As pointed out above I don't think categorizing docset storage as cache would be correct. Docsets are application data, and for many Zeal users redownloading them is not easy or not even possible. You can point Zeal to store docsets in another place to fit your setup. The default setting will not be changed.

trollixx avatar Apr 03 '24 18:04 trollixx