Adding a `--noHTTPCache` equivalent in the Hugo config file

I want to develop sites with --noHTTPCache turned on, but I’ll often forget to enable it at the command line. I also like being able to type out hugo serve from memory instead of having to remember a bunch of different command-line options. Because of this, I’d like to be able to specify --noHTTPCache in my config.yaml.

It looks like all* I’d need to do is change server.go at about line 306 to add a line to pull in configuration information from the config instead of just the *cobra.Command.

Would this be a feature worth adding to Hugo, and if so, what should I call the config preference? “httpCache (default: true)”?

* Not literally true. Of course, I’d be updating the documentation to match.

No, this is a development and server flag and does not belong in the site config. I suggest you create yourself a bash alias or a startup script or something with the flags you usually use.

Makes sense. Thanks.