[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Please document the caching and its user options
From: |
Eli Zaretskii |
Subject: |
Re: Please document the caching and its user options |
Date: |
Sat, 15 Jun 2024 17:37:50 +0300 |
> From: Ihor Radchenko <yantar92@posteo.net>
> Cc: emacs-orgmode@gnu.org, emacs-devel@gnu.org, Michael Albinus
> <michael.albinus@gmx.de>
> Date: Sat, 15 Jun 2024 14:13:03 +0000
>
> CCing emacs-devel as I'd like to upgrade this discussion to Emacs-wide
> context.
>
> Eli Zaretskii <eliz@gnu.org> writes:
>
> >> ... I wanted to know what is being cached, why, and in what file/directory.
> >>
> > > ...
> >> Would it be possible for Emacs to define a framework for cache/var/data
> >> locations? Such framework would not only be useful in the context of
> >> this discussion, but also to tackle the issue with packages sprinkling
> >> things randomly into .emacs.d or ~/ (see
> >> https://github.com/emacscollective/no-littering/)
> >
> > I think Emacs already provides all the framework for caching that is
> > needed. Caching simply means you write some data to file, and all the
> > building blocks of that already exist, for quite some time, actually.
> > The only thing that is application dependent is the data to be cached
> > and how to serialize that, but that cannot be usefully generalized.
>
> I was referring to some kind of global option that defines cache
> directory, data directory, etc. Something akin XDG.
We already have xdg-cache-home (and a few others in xdg.el). Is that
what you meant?
> Also, caching is not as simple, because caches may contain sensitive
> data. (see
> https://list.orgmode.org/orgmode/CAM9ALR8fuSu0YWS1SehRw7sYxprJFX-r2juXd_DgvCYVKQc95Q@mail.gmail.com/)
> Some users may want to move caches to read-restricted location
> or even to location dependent on where the cache is originating from
> (separate caches depending on whether default-directory is from
> encrypted volume, remote mount, etc)
AFAIK, Emacs has APIs for at least some of that, but whether to use
them is up to the application, I think.
> Finally, we got several requests to have caches cleared up upon exiting
> Emacs, which is also something that should be better managed centrally,
> by Emacs, for all possible kinds of cache/history data.
Deleting files in a directory, recursively if needed, is already
available. is that what you meant?
> >> > multisession is an optional package, it is neither preloaded nor
> >> > turned on by default in Emacs.
> >>
> >> It is used by default in emoji.el (C-x 8 e r)
> >
> > Which is also optional. And a minor feature at that.
>
> It is just for now.
> TRAMP (by no means a minor feature), has the following TODO item in
> tramp-cache.el:
>
> ;;; TODO:
> ;;
> ;; * Use multisession.el, starting with Emacs 29.1.
How far are you prepared to go just to make a point?
> >> (Also, should we open some kind of bug report to track documenting
> >> multisession in the manual?)
> >
> > I don't mind, but it sounds like an exaggeration to me.
>
> I kind of agree, if we talk about the current state of affairs. But, I'd
> like to discuss this in the context I elaborated on above - more
> centralized cache management.
Can we first fix the problems for which I started this thread? The
more general issues should be subjects of separate discussions, IMO.
- Please document the caching and its user options, Eli Zaretskii, 2024/06/12
- Re: Please document the caching and its user options, Ihor Radchenko, 2024/06/14
- Re: Please document the caching and its user options, Eli Zaretskii, 2024/06/14
- Re: Please document the caching and its user options, Ihor Radchenko, 2024/06/14
- Re: Please document the caching and its user options, Eli Zaretskii, 2024/06/14
- Re: Please document the caching and its user options, Ihor Radchenko, 2024/06/15
- Re: Please document the caching and its user options, Eli Zaretskii, 2024/06/15
- Re: Please document the caching and its user options, Ihor Radchenko, 2024/06/15
- Re: Please document the caching and its user options,
Eli Zaretskii <=
- Re: Please document the caching and its user options, Ihor Radchenko, 2024/06/16
- Re: Please document the caching and its user options, Eli Zaretskii, 2024/06/16
- Re: Please document the caching and its user options, Björn Bidar, 2024/06/23
- Re: Please document the caching and its user options, Ihor Radchenko, 2024/06/15
Re: Please document the caching and its user options, Jens Lechtenboerger, 2024/06/14
Re: Please document the caching and its user options, Daniel Clemente, 2024/06/16