dune-cache - Man Page

Manage the shared artifacts cache


dune cache [OPTION]... [ACTION]


Dune is able to share build artifacts between workspaces. dune cache-daemon is a daemon that runs in the background and manages this shared cache. For instance, it makes sure that it does not grow too big and try to maximise sharing between the various workspaces that are using the shared cache.

The daemon is automatically started by Dune when the shared cache is enabled. You do not need to run this command manually.


start starts the daemon if not already running.

stop stops the daemon.

trim removes oldest files from the cache to free space.



The cache-daemon action to perform (one of `start', `stop' or `trim')


--exit-no-client (absent DUNE_CACHE_EXIT_NO_CLIENT env)

Whether to exit once all clients have disconnected

-f, ā€‰--foreground

Whether to start in the foreground or as a daemon

--help[=FMT] (default=auto)

Show this help in format FMT. The value FMT must be one of `auto', `pager', `groff' or `plain'. With `auto', the format is `pager` or `plain' whenever the TERM env var is `dumb' or undefined.

--port-file=PATH (absent=/builddir/.cache/dune/db/runtime/dune-cache-daemon/port)

The file to read/write the daemon port from/to.

--root=PATH (absent=/builddir/.cache/dune/db)

Root of the dune cache


size to trim the cache to


size to trim from the cache


Show version information.

Common Options

These options are common to all commands.


Load this configuration file instead of the default one.


Control the display mode of Dune. See dune-config(5) for more details.


Do not load the configuration file


Same as --display verbose

More Help

Use `dune COMMAND --help' for help on a single command.


These environment variables affect the execution of cache:


Whether to exit once all clients have disconnected


Check bug reports at https://github.com/ocaml/dune/issues


Dune n/a Dune Manual