Caching

The file caches fugo keeps between builds — processed images, assets and remote resources — and how to configure or clear them.

fugo keeps the results of slow work on disk so that the next build is fast:

CacheHoldsDefault directory
imagesprocessed images:resourceDir/_gen
assetstransformed assets (Sass, bundles, …):resourceDir/_gen
getresourcefiles fetched with get_remote:cacheDir/:project
miscother results:cacheDir/:project

:resourceDir is the project’s resources/; :cacheDir the cache directory (cacheDir, or --cache-dir, else $XDG_CACHE_HOME/fugo_cache or ~/.cache/fugo_cache); :project the project directory’s name.

config.toml
[caches]
  [caches.getresource]
    dir = ":cacheDir/:project"
    maxAge = "1h"
  [caches.images]
    dir = ":resourceDir/_gen"
    maxAge = -1

maxAge is how long an entry stays valid: -1 (the default) forever, 0 never, or a duration ("10m", "24h") or a number of seconds. fugo build --ignore-cache ignores every cache for one build.

Commit resources/_gen (or keep it in your CI cache) so that a fresh checkout does not process every image again. Delete it to start over.

The npm packages that fugo downloads are kept in :cacheDir/packages. Every project shares them, and they have no maxAge. Delete the directory to download them again.

    Type to search titles, headings and text.