mirror of
https://github.com/gohugoio/hugo.git
synced 2025-05-07 03:07:25 +03:00
cache: Set default cache path based on $USER
Change the default cache directory to `$TMPDIR/hugo_cache_$USER`, so that multi-user systems do not have caches that interfere with each other. The other cache-choosing logic (e.g. Netlify exceptions, configuration options) are not affected. Fixes #7391
This commit is contained in:
parent
254c2b323c
commit
258884f44f
16 changed files with 21 additions and 16 deletions
|
@ -27,7 +27,7 @@ hugo [flags]
|
|||
-D, --buildDrafts include content marked as draft
|
||||
-E, --buildExpired include expired content
|
||||
-F, --buildFuture include content with publishdate in the future
|
||||
--cacheDir string filesystem path to cache directory. Defaults: $TMPDIR/hugo_cache/
|
||||
--cacheDir string filesystem path to cache directory. Defaults: $TMPDIR/hugo_cache_$USER/
|
||||
--cleanDestinationDir remove files from destination not found in static directories
|
||||
--clock string set the clock used by Hugo, e.g. --clock 2021-11-06T22:30:00.00+09:00
|
||||
--config string config file (default is hugo.yaml|json|toml)
|
||||
|
|
|
@ -19,7 +19,7 @@ hugo config [command] [flags]
|
|||
|
||||
```
|
||||
-b, --baseURL string hostname (and path) to the root, e.g. https://spf13.com/
|
||||
--cacheDir string filesystem path to cache directory. Defaults: $TMPDIR/hugo_cache/
|
||||
--cacheDir string filesystem path to cache directory. Defaults: $TMPDIR/hugo_cache_$USER/
|
||||
-c, --contentDir string filesystem path to content directory
|
||||
--format string preferred file format (toml, yaml or json) (default "toml")
|
||||
-h, --help help for config
|
||||
|
|
|
@ -15,7 +15,7 @@ hugo config mounts [flags] [args]
|
|||
|
||||
```
|
||||
-b, --baseURL string hostname (and path) to the root, e.g. https://spf13.com/
|
||||
--cacheDir string filesystem path to cache directory. Defaults: $TMPDIR/hugo_cache/
|
||||
--cacheDir string filesystem path to cache directory. Defaults: $TMPDIR/hugo_cache_$USER/
|
||||
-c, --contentDir string filesystem path to content directory
|
||||
-h, --help help for mounts
|
||||
-t, --theme strings themes to use (located in /themes/THEMENAME/)
|
||||
|
|
|
@ -20,7 +20,7 @@ hugo mod clean [flags] [args]
|
|||
```
|
||||
--all clean entire module cache
|
||||
-b, --baseURL string hostname (and path) to the root, e.g. https://spf13.com/
|
||||
--cacheDir string filesystem path to cache directory. Defaults: $TMPDIR/hugo_cache/
|
||||
--cacheDir string filesystem path to cache directory. Defaults: $TMPDIR/hugo_cache_$USER/
|
||||
-c, --contentDir string filesystem path to content directory
|
||||
-h, --help help for clean
|
||||
--pattern string pattern matching module paths to clean (all if not set), e.g. "**hugo*"
|
||||
|
|
|
@ -21,7 +21,7 @@ hugo mod graph [flags] [args]
|
|||
|
||||
```
|
||||
-b, --baseURL string hostname (and path) to the root, e.g. https://spf13.com/
|
||||
--cacheDir string filesystem path to cache directory. Defaults: $TMPDIR/hugo_cache/
|
||||
--cacheDir string filesystem path to cache directory. Defaults: $TMPDIR/hugo_cache_$USER/
|
||||
--clean delete module cache for dependencies that fail verification
|
||||
-c, --contentDir string filesystem path to content directory
|
||||
-h, --help help for graph
|
||||
|
|
|
@ -26,7 +26,7 @@ hugo mod init [flags] [args]
|
|||
|
||||
```
|
||||
-b, --baseURL string hostname (and path) to the root, e.g. https://spf13.com/
|
||||
--cacheDir string filesystem path to cache directory. Defaults: $TMPDIR/hugo_cache/
|
||||
--cacheDir string filesystem path to cache directory. Defaults: $TMPDIR/hugo_cache_$USER/
|
||||
-c, --contentDir string filesystem path to content directory
|
||||
-h, --help help for init
|
||||
-t, --theme strings themes to use (located in /themes/THEMENAME/)
|
||||
|
|
|
@ -29,7 +29,7 @@ hugo mod npm pack [flags] [args]
|
|||
|
||||
```
|
||||
-b, --baseURL string hostname (and path) to the root, e.g. https://spf13.com/
|
||||
--cacheDir string filesystem path to cache directory. Defaults: $TMPDIR/hugo_cache/
|
||||
--cacheDir string filesystem path to cache directory. Defaults: $TMPDIR/hugo_cache_$USER/
|
||||
-c, --contentDir string filesystem path to content directory
|
||||
-h, --help help for pack
|
||||
-t, --theme strings themes to use (located in /themes/THEMENAME/)
|
||||
|
|
|
@ -15,7 +15,7 @@ hugo mod tidy [flags] [args]
|
|||
|
||||
```
|
||||
-b, --baseURL string hostname (and path) to the root, e.g. https://spf13.com/
|
||||
--cacheDir string filesystem path to cache directory. Defaults: $TMPDIR/hugo_cache/
|
||||
--cacheDir string filesystem path to cache directory. Defaults: $TMPDIR/hugo_cache_$USER/
|
||||
-c, --contentDir string filesystem path to content directory
|
||||
-h, --help help for tidy
|
||||
-t, --theme strings themes to use (located in /themes/THEMENAME/)
|
||||
|
|
|
@ -21,7 +21,7 @@ hugo mod vendor [flags] [args]
|
|||
|
||||
```
|
||||
-b, --baseURL string hostname (and path) to the root, e.g. https://spf13.com/
|
||||
--cacheDir string filesystem path to cache directory. Defaults: $TMPDIR/hugo_cache/
|
||||
--cacheDir string filesystem path to cache directory. Defaults: $TMPDIR/hugo_cache_$USER/
|
||||
-c, --contentDir string filesystem path to content directory
|
||||
-h, --help help for vendor
|
||||
-t, --theme strings themes to use (located in /themes/THEMENAME/)
|
||||
|
|
|
@ -19,7 +19,7 @@ hugo mod verify [flags] [args]
|
|||
|
||||
```
|
||||
-b, --baseURL string hostname (and path) to the root, e.g. https://spf13.com/
|
||||
--cacheDir string filesystem path to cache directory. Defaults: $TMPDIR/hugo_cache/
|
||||
--cacheDir string filesystem path to cache directory. Defaults: $TMPDIR/hugo_cache_$USER/
|
||||
--clean delete module cache for dependencies that fail verification
|
||||
-c, --contentDir string filesystem path to content directory
|
||||
-h, --help help for verify
|
||||
|
|
|
@ -26,7 +26,7 @@ hugo new content [path] [flags]
|
|||
|
||||
```
|
||||
-b, --baseURL string hostname (and path) to the root, e.g. https://spf13.com/
|
||||
--cacheDir string filesystem path to cache directory. Defaults: $TMPDIR/hugo_cache/
|
||||
--cacheDir string filesystem path to cache directory. Defaults: $TMPDIR/hugo_cache_$USER/
|
||||
-c, --contentDir string filesystem path to content directory
|
||||
--editor string edit new content with this editor, if provided
|
||||
-f, --force overwrite file if it already exists
|
||||
|
|
|
@ -33,7 +33,7 @@ hugo server [command] [flags]
|
|||
-D, --buildDrafts include content marked as draft
|
||||
-E, --buildExpired include expired content
|
||||
-F, --buildFuture include content with publishdate in the future
|
||||
--cacheDir string filesystem path to cache directory. Defaults: $TMPDIR/hugo_cache/
|
||||
--cacheDir string filesystem path to cache directory. Defaults: $TMPDIR/hugo_cache_$USER/
|
||||
--cleanDestinationDir remove files from destination not found in static directories
|
||||
-c, --contentDir string filesystem path to content directory
|
||||
--disableBrowserError do not show build errors in the browser
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue