mirror of https://github.com/gohugoio/hugo
1.2 KiB
1.2 KiB
title | linkTitle | description | categories | keywords |
---|---|---|---|---|
Configure file caches | Caches | Configure file caches. |
This is the default configuration:
{{< code-toggle config=caches />}}
Keys
- dir
- (
string
) The absolute file system path where the cached files will be stored. You can begin the path with the:cacheDir
or:resourceDir
token. These tokens will be replaced with the actual configured cache directory and resource directory paths, respectively. - maxAge
- (
string
) The duration a cached entry remains valid before being evicted. A value of0
disables the cache. A value of-1
means the cache entry never expires (the default).
Tokens
:cacheDir
- (
string
) The designated cache directory. See details. :project
- (
string
) The base directory name of the current Hugo project. By default, this ensures each project has isolated file caches, so runninghugo --gc
will only affect the current project's cache and not those of other Hugo projects on the same machine. :resourceDir
- (
string
) The designated directory for caching output from asset pipelines. See details.