Cleaning of $XDG_CACHE_HOME and $XDG_CACHE_HOME/thumbnails

Benjamin Berg benjamin at sipsolutions.net
Wed Feb 26 14:04:14 UTC 2020


On Wed, 2020-02-26 at 10:58 -0300, Soni L. wrote:
> On 2020-02-26 10:39 a.m., Benjamin Berg wrote:
> > [SNIP]
> > I don't think that $XDG_CACHE_HOME is designed to be used directly by
> > users. And if it is an application which generates those repositories,
> > then again, it can just drop-in the appropriate configuration to
> > prevent cleaning.
> > [SNIP]
> > Am I missing something obvious?
> 
> Oh sorry, I should've been more specific. I use it in the program I make 
> https://ganarchy.autistic.space/project/385e734a52e13949a7a5c71827f6de920dbfea43/
> 
> > > Besides, what if you nuke it *while* the thing is running? That
> > > doesn't sound like a good idea.
> > 
> > This seems like a rather unlikely corner case. In particular as the
> > atime is taken into account by tmpfiles.d. So there should be no need
> > to worry about files being deleted that have been used in the last 30
> > days or so.
> 
> I believe git won't necessarily touch old object files such as those 
> from really old commits, so that might still break stuff. Unless I'm 
> misunderstanding something here and it's meant to be all-or-nothing.

Right, but in your usecase, all you need to do is create a file (at
installation or startup when running from source) in:
  $XDG_CONFIG_DIR/tmpfiles.d/ganarchy.conf
or
  /us/share/user-tmpfiles.d/ganarchy.conf
with the single line
  x %C/ganarchy
or something very similar.

Really, all this does make it explicit that you do not want automatic
cache cleaning for the corresponding directory.

Benjamin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part
URL: <https://lists.freedesktop.org/archives/xdg/attachments/20200226/5f9f181f/attachment.sig>


More information about the xdg mailing list