diff options
author | Paul van Brouwershaven <vanbroup@users.noreply.github.com> | 2021-12-02 12:56:25 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-02 12:56:25 +0100 |
commit | 66753416b5ec0f9f1be588a935d5551dfb5eebb9 (patch) | |
tree | 2541d5a3630a7aba3315c627d458e54b4812408a /docs | |
parent | 133e4bfbeee47bf6843fbcad90f14501f3d3a099 (diff) |
Make resources.Get use a file cache for remote resources
Closes #9228
Diffstat (limited to 'docs')
-rw-r--r-- | docs/content/en/getting-started/configuration.md | 3 | ||||
-rwxr-xr-x | docs/content/en/hugo-pipes/introduction.md | 10 |
2 files changed, 13 insertions, 0 deletions
diff --git a/docs/content/en/getting-started/configuration.md b/docs/content/en/getting-started/configuration.md index 9c78446ac..8332421be 100644 --- a/docs/content/en/getting-started/configuration.md +++ b/docs/content/en/getting-started/configuration.md @@ -657,6 +657,9 @@ maxAge = -1 [caches.getcsv] dir = ":cacheDir/:project" maxAge = -1 +[caches.getresource] +dir = ":cacheDir/:project" +maxAge = -1 [caches.images] dir = ":resourceDir/_gen" maxAge = -1 diff --git a/docs/content/en/hugo-pipes/introduction.md b/docs/content/en/hugo-pipes/introduction.md index 7a0ce5fc5..d097dec6b 100755 --- a/docs/content/en/hugo-pipes/introduction.md +++ b/docs/content/en/hugo-pipes/introduction.md @@ -55,6 +55,16 @@ You can also change the request method and set the request body: )}} ``` +#### Cache of remote resources + +Each downloaded URL will be cached in the default folder `$TMPDIR/hugo_cache/`. The variable `$TMPDIR` will be resolved to your system-dependent temporary directory. + +With the command-line flag `--cacheDir`, you can specify any folder on your system as a caching directory. + +You can also set `cacheDir` or `caches.getresource` in the [main configuration file][config]. + +If you don't like caching at all, you can fully disable caching with the command line flag `--ignoreCache`. + ### Asset publishing Assets will only be published (to `/public`) if `.Permalink` or `.RelPermalink` is used. |