karis
1
Do I need to add anything for remote JSON files to be cached in the resources folder? Because looking in there, no files there.
[caches]
[caches.getresource]
dir = ':cacheDir/:project'
maxAge = "168h"
[caches.images]
dir = ':resourceDir/_gen'
maxAge = "1440h"
[caches.assets]
dir = ':resourceDir/_gen'
maxAge = -1
With the configuration shown above, the result is stored in the cacheDir
, not the resourceDir
.
hugo config | grep cachedir
With Linux the above will show something like:
/home/jmooring/.cache/hugo_cache
After clearing my cache and running a simple test:
tree ~/.cache/hugo_cache/
Result:
/home/jmooring/.cache/hugo_cache/
└── hugo-testing/
└── filecache/
└── getresource/
└── 5925642490856772588
1 Like
karis
6
@jmooring is there any need to commit these files or just .gitignore
them?
Search this forum for “commit resources”. The short answer is… it depends.
1 Like
system
Closed
8
This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.