Caches¶
Makex provides a uniform filesystem based cache for all of a task’s outputs.
The default location of the cache is ~/.cache/makex
. The location of this cache may be configured.
When Makex and tasks are run, a link to the cache folder (named _output_
) is produced next to the Makex File in which tasks are defined. This is a convenience, so that output files may be located and inspected easily.
With the correct configuration, the cache may be shared by multiple processes of Makex; potentially running across different machines.
Task Output Caching¶
An identifier is generated for each task which we’ll call task_output_id
.
A Workspace identifier (workspace_id
) is generated by hashing the Workspace in a stable manner (currently, by its absolute path).
A Task’s output path may be defined by argument, otherwise it will be automatically generated.
Automatically generated paths are stored into a cache with the following example structure:
~/.cache/makex/
:The default path to the cache.
Can be controlled with the
--cache
argument tomakex
.Makex may store additional files/databases in this directory.
~/.cache/makex/{workspace_id}/
:The Workspace in the cache.
~/.cache/makex/{workspace_id}/_output_/{task_output_id}/
:The output folder of a task in the root directory of the Workspace (e.g.
//:{task_name}
).
~/.cache/makex/{workspace_id}/path/to/task/_output_/{task_output_id}/
:The output folder of a task
//path/to/task:{task_name}
in the Workspace.