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 resolved
Milestone Resolved in 2.10.0 HEAD
Superseder Nosy List nomeata
Assigned To
Topics

Created on 2012-04-20.19:53:07 by nomeata, last changed 2013-07-20.11:00:46 by noreply.

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?
msg16907 (view) Author: gh Date: 2013-07-18.09:51:58
For Mac the convention seems to be ~/Library/Caches/.

( http://www.westwind.com/reference/os-x/where-files.html,
http://www.macforensicslab.com/ProductsAndServices/index.php?main_page=document_general_info&products_id=31
... )
msg16909 (view) Author: gh Date: 2013-07-18.09:57:59
As for Windows, I've looked into the source code of two cross-platform
applications (VLC and Gajim) and they store the cache along with the
configuration files, which is what we already do.
msg16922 (view) Author: noreply Date: 2013-07-20.11:00:45
The following patch sent by Guillaume Hoffmann <guillaumh@gmail.com> updated issue issue2181 with
status=resolved;resolvedin=2.10.0 HEAD

* resolve issue2181: put cache in $XDG_CACHE_HOME (~/.cache by default) 
Ignore-this: 8e03f45d50db82954573b1c62362c2df
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)
2013-07-18 09:51:59ghsetmessages: + msg16907
2013-07-18 09:58:00ghsetmessages: + msg16909
2013-07-18 13:18:29ghsetstatus: needs-diagnosis/design -> has-patch
2013-07-20 11:00:46noreplysetstatus: has-patch -> resolved
messages: + msg16922
resolvedin: 2.10.0 HEAD