mirror of
https://github.com/tiennm99/hugoDocs.git
synced 2026-10-15 16:14:41 +00:00
1.2 KiB
1.2 KiB
title, linkTitle, description, categories, keywords
| 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:cacheDiror:resourceDirtoken. These tokens will be replaced with the actual configured cache directory and resource directory paths, respectively. - maxAge
- (
string) Thedurationa cached entry remains valid before being evicted. A value of0disables the cache. A value of-1means 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 --gcwill 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.