mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-28 22:19:59 +02:00
Merge commit '5be51ac3db225d5df501ed1fa1499c41d97dbf65'
This commit is contained in:
30
docs/content/en/configuration/caches.md
Normal file
30
docs/content/en/configuration/caches.md
Normal file
@@ -0,0 +1,30 @@
|
||||
---
|
||||
title: Configure file caches
|
||||
linkTitle: Caches
|
||||
description: Configure file caches.
|
||||
categories: []
|
||||
keywords: []
|
||||
---
|
||||
|
||||
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](g) a cached entry remains valid before being evicted. A value of `0` disables the cache. A value of `-1` means the cache entry never expires (the default).
|
||||
|
||||
## Tokens
|
||||
|
||||
`:cacheDir`
|
||||
: (`string`) The designated cache directory. See [details](/configuration/all/#cachedir).
|
||||
|
||||
`:project`
|
||||
: (`string`) The base directory name of the current Hugo project. By default, this ensures each project has isolated file caches, so running `hugo --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](g). See [details](/configuration/all/#resourcedir).
|
Reference in New Issue
Block a user