Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 13 additions & 5 deletions doc/caching.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,27 @@ or simply undoing some changes within the same workspace.
Configuration
=============

For now, Dune cache is an opt-in feature. There are three ways to enable it.
Choose the one that is more convenient for you:
Since version 3.17, Dune cache is an opt-out feature: it is enabled by default.
There are three ways to disable it. Choose the one that is more convenient for you:

* Add ``(cache enabled)`` to your Dune configuration file
* Add ``(cache disabled)`` to your Dune configuration file
(``~/.config/dune/config`` by default).
* Set the environment variable ``DUNE_CACHE`` to ``enabled``
* Run Dune with the ``--cache=enabled`` flag.
* Set the environment variable ``DUNE_CACHE`` to ``disabled``
* Run Dune with the ``--cache=disabled`` flag.

By default, Dune stores the cache in your ``XDG_CACHE_HOME`` directory on \*nix
systems and ``%LOCALAPPDATA%\Microsoft\Windows\Temporary Internet Files\dune`` on Windows.
You can change the default location by setting the environment variable
``DUNE_CACHE_ROOT``.

.. versionchanged:: 3.17 The cache used to be opt-in, disabled by default.

Caching User Rules
==================

Not all rules are cached by default: user-created ``(rule _)`` actions are not to prevent mistakes.
You can enable the caching of these rules by setting the environment variable ``DUNE_CACHE_RULES`` to ``enabled``.

Comment on lines +36 to +38
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to be clear, this is about caching the output of such rules right? Not the rules themselves

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't really know what caching a rule without caching its result would even mean. So yes I believe this is about caching outputs.


Cache Storage Mode
==================
Expand Down
3 changes: 3 additions & 0 deletions doc/changes/10710.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
- Enable Dune's cache by default. This makes `DUNE_CACHE=enabled` largely obsolete for end users.
User-created `rule`s are not cached by default. They can now be cached by setting `DUNE_CACHE_RULES=enabled` (off by default).
(#10710, @ElectreAAS, joint work with @Leonidas-from-XIV)