ref: 56512e816fc88f90a7643526d93358fa4761200d
parent: 3616fb629b33d8f2ac91eea77932e24076e31d1b
author: Dimitri Merejkowsky <[email protected]>
date: Sun Oct 9 07:00:36 EDT 2016
Allow to set cache dir in config file
--- a/commands/hugo.go
+++ b/commands/hugo.go
@@ -373,6 +373,11 @@
}
if cacheDir != "" {
+ viper.Set("CacheDir", cacheDir)
+ }
+
+ cacheDir = viper.GetString("cacheDir")
+ if cacheDir != "" {
if helpers.FilePathSeparator != cacheDir[len(cacheDir)-1:] {
cacheDir = cacheDir + helpers.FilePathSeparator
}
--- a/docs/content/extras/datadrivencontent.md
+++ b/docs/content/extras/datadrivencontent.md
@@ -103,6 +103,8 @@
With the command-line flag `--cacheDir`, you can specify any folder on
your system as a caching directory.
+You can also set `cacheDir` in the main configuration file.
+
If you don't like caching at all, you can fully disable caching with the
command line flag `--ignoreCache`.