darcs

Issue 2181 Please put cache in $XDG_CACHE_HOME (~/.cache by default)

Title Please put cache in $XDG_CACHE_HOME (~/.cache by default)
Priority wishlist Status needs-diagnosis/design
Milestone Resolved in
Superseder Nosy List nomeata
Assigned To
Topics

Created on 2012-04-20.19:53:07 by nomeata, last changed 2012-05-07.03:52:21 by joshtriplett.

Messages
msg15583 (view) Author: nomeata Date: 2012-04-20.19:53:07
Originally reported as
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=642349:

Darcs seems to store a cache in ~/.darcs/cache .  Please consider moving
this to a darcs subdirectory in the common ~/.cache directory.
msg15619 (view) Author: kowey Date: 2012-04-25.14:28:57
I'd like somebody to go out and hunt down similar conventions for Mac and 
Windows too first.
msg15655 (view) Author: joshtriplett Date: 2012-05-07.03:51:26
> Darcs seems to store a cache in ~/.darcs/cache .  Please consider
moving this to a darcs subdirectory in the common ~/.cache directory.

Slight correction to this: darcs should use $XDG_CACHE_HOME if set, and
fall back to ~/.cache if not.  See the XDG Base Directory Specification
for more details:
http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html

> I'd like somebody to go out and hunt down similar conventions for Mac
and Windows too first.

On Windows, I think you want to use a subdirectory of the directory
returned from GetTempPath().  That path has similar semantics: many
cleanup utilities and backup utilities know about it.

On OS X, I think you want a subdirectory of ~/Library/Caches.  I don't
know if some standard function exists to obtain that path, or if you
should just hardcode it.  (Note that applications in an application
bundle normally use a cache directory inside their application instead,
but I'd guess that doesn't apply to a command-line tool like darcs.)

Does that help?
History
Date User Action Args
2012-04-20 19:53:07nomeatacreate
2012-04-25 14:28:58koweysetstatus: unknown -> needs-diagnosis/design
messages: + msg15619
2012-05-07 03:51:28joshtriplettsetmessages: + msg15655
2012-05-07 03:52:21joshtriplettsettitle: Please put cache in ~/.cache -> Please put cache in $XDG_CACHE_HOME (~/.cache by default)