diff options
author | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2018-11-14 17:18:32 +0100 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2018-11-14 23:14:51 +0100 |
commit | 94f0f7e59788e802e706a55cac0d52a9e70ff745 (patch) | |
tree | d8e613f37940aeadd18703f35b9bf912c360be72 /docs | |
parent | 3c29c5af8ee865ef20741f576088e031e940c3d2 (diff) |
cache/filecache: Add a :project placeholder
This allows for "cache per Hugo project", making `hugo --gc` work as expected, even if you have several Hugo projects running on the same PC.
See #5439
Diffstat (limited to 'docs')
-rw-r--r-- | docs/content/en/getting-started/configuration.md | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/docs/content/en/getting-started/configuration.md b/docs/content/en/getting-started/configuration.md index cb2eed4cd..f67b9370b 100644 --- a/docs/content/en/getting-started/configuration.md +++ b/docs/content/en/getting-started/configuration.md @@ -413,10 +413,10 @@ Since Hugo 0.52 you can configure more than just the `cacheDir`. This is the def ```toml [caches] [caches.getjson] -dir = ":cacheDir" +dir = ":cacheDir/:project" maxAge = -1 [caches.getcsv] -dir = ":cacheDir" +dir = ":cacheDir/:project" maxAge = -1 [caches.images] dir = ":resourceDir/_gen" @@ -434,6 +434,9 @@ You can override any of these cache setting in your own `config.toml`. :cacheDir : This is the value of the `cacheDir` config option if set (can also be set via OS env variable `HUGO_CACHEDIR`). It will fall back to `/opt/build/cache/hugo_cache/` on Netlify, or a `hugo_cache` directory below the OS temp dir for the others. This means that if you run your builds on Netlify, all caches configured with `:cacheDir` will be saved and restored on the next build. For other CI vendors, please read their documentation. For an CircleCI example, see [this configuration](https://github.com/bep/hugo-sass-test/blob/6c3960a8f4b90e8938228688bc49bdcdd6b2d99e/.circleci/config.yml). +:project + +The base directory name of the current Hugo project. This means that, in its default setting, every project will have separated file caches, which means that when you do `hugo --gc` you will not touch files related to other Hugo projects running on the same PC. :resourceDir : This is the value of the `resourceDir` config option. |