Cleaning of $XDG_CACHE_HOME and $XDG_CACHE_HOME/thumbnails

Benjamin Berg <[email protected]>
Newsgroups gmane.linux.xdg.devel
Message-ID <[email protected]>
Hi,

so I looked at gsd-housekeeping the other day. With systemd-tempfiles,
it only has two purposes these days:

 1. Cleaning $XDG_CACHE_HOME/thumbnails after 30 days
 2. Cleaning the trash directories after a configurable time

Currently it also tries to clean /tmp and /var/tmp, but doing so is
really dangerous compared to just leaving it up to systemd-tempfiles (I
have filed an MR to disable the logic if we are systemd booted).


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. So I am thinking that we could do the following:

   1. Specify that we use the systemd tmpfiles.d configuration format for
      cleaning $XDG_CACHE_HOME. Also specify that $XDG_CACHE_HOME will be
      cleaned automatically after e.g. 30 days unless otherwise configured
      by an application.
   2. Add some reference to this to the thumbnail specification.
   3. Tell application maintainers that they need to ship a configuration
      if they want to keep files longer (likely candidates are e.g. email
      clients).
   4. As a start, add a "xdg-thumbnails.conf" systemd-tempfiles
      configuration to systemd that cleans $XDG_CACHE_HOME/thumbnails
      after 30 days.
   5. After a grace period, add "xdg-cache.conf" to clean $XDG_CACHE_HOME
      and remove "xdg-thumbnails.conf" again (similar to how
      /usr/lib/tmpfiles.d/tmp.conf does it for /var/tmp and /tmp)

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?
Other thoughts?

Benjamin

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

iQIzBAABCAAdFiEED2NO4vMS33W8E4AFq6ZWhpmFY3AFAl5WaHYACgkQq6ZWhpmF
Y3B3hRAAoct3bXe8b017zqb9FBOZuXoomIfjC5vAjqjN2ML2LjlOzlwp33WZXI8v
9SdSMSRqPIEaCU8O4UyTyBEwwmjAzlqQ2lUqYEaj2ABLTHzDCKFtnMvFUb6XMaK7
kohBCbVFnNNO/tIJVHXEnwN/wxeNbDpHaIe/+2inKjpQpSmeLOZtHHw+0/lmKgCb
z6HJBZQ3rgPT7Z7fjqOi0JOEmX//y777vsWbsWPysg8WebuzqP7XuRoGSSHmiOXh
/0Wc+RextOWelMGS3k/BY0Jit3Du6NawNqtjiK99nP5qpAOSFy+onaaS/31l8S/h
lgi9kKX5/I1DeBlZxwXYxFdf+aukkCFN6TqDkFeQ0uR41W1j7Md8TzaKFbe1Rn8g
FldBovnEbB8gqZrl2gFDH3h2ZbB9UsWdu1zqJK69ytX3v1sFSWhy+bPBAVoQjClD
Cigdfa2m3FWdo40aRuPthTeTWbM/NAu8wNi4+3AMTu3PGqIe4m+wQEUzgjDIg18U
++VmjU9ZpKTiKjmPmH3MEUlGuB+cYOkLGHPUrO40r3yurfsUTTc50rzk6Kgq/g1T
jzxfLpgK2sSL+irhoWFItjLb1Ye/dIONOGTvJORV+fYScvlwR+EKt8FGRvaKZY72
VrsV5fmlQdQTz8pPw5NnNwAs4Dyt86qjErTRrEjFOvqjNILCwSw=
=A/xZ
-----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.