Re: Cleaning of $XDG_CACHE_HOME and $XDG_CACHE_HOME/thumbnails

Benjamin Berg <[email protected]>
Newsgroups gmane.linux.xdg.devel
Message-ID <[email protected]>
On Wed, 2020-02-26 at 14:46 +0100, Bardot Jérôme wrote:
> On 26/02/2020 14:30, Benjamin Berg wrote:
> > On Wed, 2020-02-26 at 14:22 +0100, Bastien Nocera wrote:
> > > On Wed, 2020-02-26 at 13:45 +0100, Benjamin Berg wrote:
> > > > Now, systemd-tempfiles can already clean up everything except for the
> > > > trash. And considering that $XDG_CACHE_HOME is non-essential by
> > > > definition, I think it might be sane to use systemd-tempfiles not only
> > > > to clean the thumbnails but the entirety of $XDG_CACHE_HOME in the
> > > > future.
> > > 
> > > It's not "non-essential", it's a cache, which can be regenerated, but
> > > it might be utterly costly to do so. Eg. there are 10 gigs of "cached"
> > > evolution mails in my ~/.cache, 5 gigs of jhbuild builddirs.
> > > 
> > > Nuking it is a last ditch scenario. You'd avoid backing it up on space
> > > constrained storage, but you'd want to avoid having to regenerate that
> > > cache in most cases.
> > 
> > I am *not* proposing to nuke these directories. I am proposing to nuke
> > them by default, and ask applications like evolution, jhbuild and
> > others to ship their own configuration.
> > 
> 
> I’m not sure a destructive by default behavior is a good thing even on
> a cache directories.
> 
> I’m pretty sure this will lead to a lost of data.

Oh, I am sure there will be some pain because there will always be
someone does not get the memo. In the same way that e.g. disallowing
processes to linger after the user logs out caused some pain.

However, I do think it the problem is manageable. And I do see a huge
advantage in requiring applications to specify the clean-up behaviour
they need or want. So the primary goal here is to get applications to
define the clean-up behaviour they want. After that the secondary goal
is to define a better default behaviour for all other cases.

Benjamin

> > This matches the behaviour of /tmp and /var/tmp on systemd managed
> > systems. In the simplest case, all evolution needs to do is ship a one
> > line file with:
> > 
> > x     %C/evolution
> > 
> > This file can even be installed to the users $XDG_CONFIG_DIR for
> > applications that might not be able to do it globally.
> > 
> Not all GNU/linux comes with systemd. Protocol and specification over
> tools/implementation specific. If it come restrictive it’s not good.
> Exept for security stuff and even in this case it’s not always a good
> choice. (for ie : 2fa when only choice is a phone)
> 
> > > <snip>
> > > > Is it reasonable to standardise on the systemd tmpfiles.d format?
> > > > Is it OK to clean $XDG_CACHE_HOME after a fixed time period by
> > > > default?
> > > 
> > > I'm guessing that's a no.
> > > 
> > > As for thumbnails, you'd probably get away with checking whether atime
> > > is actually set on that mount and cleaning up the ones that haven't
> > > been used.
> > 
> > Benjamin
> > 
> > 
> > _______________________________________________
> > xdg mailing list
> > [email protected]
> > https://lists.freedesktop.org/mailman/listinfo/xdg
> > 
> 
> _______________________________________________
> xdg mailing list
> [email protected]
> https://lists.freedesktop.org/mailman/listinfo/xdg

_______________________________________________
xdg mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/xdg
signature.asc (application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE-----

iQIzBAABCAAdFiEED2NO4vMS33W8E4AFq6ZWhpmFY3AFAl5WedsACgkQq6ZWhpmF
Y3CW0hAA1XjUbvZ0fUW0yPiuHGrUrinpONAViUOD/cAyHSn2P/ChwGJ3u3a5nUc8
jgY4dToLixC+3E2cNyma3VszshyhG/5x6zBUQ+NuI5aW2dih1UDnQ/p8pwVnSJTh
v7Lbn1ad6VrkkVOYbms7FqAXBx80Me3IbHQKNWA5+W5U17ryOMRWsn6LQmH18w9a
i+h/8APb3kDU0OtQjsd/s9R0xIIdpMTBPVSCFbB/Fn+a+OIWP6NrfONQm/cSuxSA
A9qa5hERaIZHvYCCtCN4LCsp74aOjAL5ipPVCibvM1/1b1uEticSnmEqHn2fbUf5
YCKj/LNi3zE1OAAczsz+I71TeAhGbcnmY8f/Cmwok60LkEFkt1GLJSBzf/UflSLG
FjFaKF6HhUnLa28jwVvIRcKX0RqZl+9dbTBwPacFkgtaJxr14S95cQko+Y82A/Rj
av52j6p7ED0VblzNufRllf7JZF7mHwn/vDXyjXFM3zT6pPClzPKbd0Y/8dzet7jQ
+0Zomk+PNdeBzk1hboaftz7BqV4/FS/iCSxwFPQAbMpkGpr6m205YYMHyaefnfoK
eiJKqH/HLvODPCmUHKqBAOrkkxHfD3RAfwBhCQsDtMCXA+qaD54Ze4dCO64wMA1i
g8ZGcxL/EgzcgmRQ8Lo3Hd2EQPjYg/vX286JAaMI8OBPpTpY1pQ=
=AP6/
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.