A comprehensive "WordPress + WP Super Cache" caddyfile example

You’re not wrong. But my fear, specifically, is that people will (irrationally) link the varied parts and snippets you’ve combined for your site, conceptually, as being required for their use case.

To you and I, it’s obvious that you don’t need to set Cache-Control to max-age=2592000 in order to run WordPress with Super Cache. You could set it to some other number, or even exclude it entirely, it’s not functionally required at all.

But someone who doesn’t know much about Cache-Control, why it’s there, or what it does, will very quickly assume it’s just one part of the config necessary for the site to run. They’ll never touch it, and if and when they share their configs onwards, they will include it.

Likewise for experimental_http3. I mean, I don’t even understand HTTP3 all that well, to be honest. But a newbie might just think, “oh it’s just more config needed to run a WordPress site”.

I’d rather have a Wiki entry that explains what Cache-Control is, why you’d want it, and some examples of how to configure it. That wiki would purely talk about Cache-Control, and wouldn’t include arbitrary other config snippets (except maybe when highlighted as part of another full configuration - in which case maybe the other arbitrary Caddyfile patterns present could have links to their own wiki parts).

All above being my personal opinion, of course.

4 Likes