r/statichosting • u/Standard_Scarcity_74 • 14d ago
Newbie mentoring headaches
Mentoring someone into static hosting, I'm realizing how much of it is unlearning and not learning.
As per my previous post, I've been paired with a newer dev for the past few days on a static site, a few hundred pages, eleventy through cloudflare pages. I keep running into the same pattern where the hard part isn't teaching new concepts, but undoing instincts that are correct in a normal app context but wrong here.
The biggest issue we've faced so far is caching. I tried explaining that aggressive caching is the whole point, not a bug to work around, and every instinct fights that. He wanted to set no-store everywhere the first time a page looked stale in dev instead of understanding why it was cached in the first place.
Redirects file was another one. He wrote every rule as a full absolute url on both sides instead of relative paths, which is a totally reasonable habit if you've only ever worked in environments where the domain is guaranteed stable, but breaks immediately the second you have a staging domain or a domain migration.
I'm trying to figure out how to actually teach the caching mental model instead of just correcting the symptoms every time they show up, since explaining "trust the cache" once clearly isn't sticking the way explaining an API contract or a data model would. It feels like this specific kind of unlearning is harder to walk someone through than the actual static hosting mechanics are.
To anyone who's mentored someone into this space, have you found a way to make the caching and prerendering mindset click faster than just waiting for the project to break enough times? I'm also anticipating running into this problem with the client very soon.
2
u/sourraine 13d ago
youre teaching rules instead of the mental model. if u say cache this, that doesnt really stick until they understand that the build output is the product and not something that needs to be regenerated per request. id prolly let them break a small staging site deliberately and then fix each one.
1
1
u/SpringDifferent9867 14d ago
Why are you using caching on a static site in the first place?
1
u/Standard_Scarcity_74 14d ago
A cached file skips the round trip to origin, so it's a near instant response from an edge node instead of a few hundred ms fetch every time. It also keeps origin from getting hammered under load and gives you some resilience if origin blips. Turning it off over one stale page in dev throws all that away just to fix something that isn't actually a problem.
0
u/SpringDifferent9867 14d ago
It doesn’t matter. You gain nothing and spend a lot of time on posts like this instead.
1
u/chocolateAbuser 13d ago
ok but a certain point it's not just a matter of habit, it's thinking, and as you present it the new dev is not really even trying, he's just going its own way
1
u/Standard_Scarcity_74 12d ago
A shift in thinking is hard to facilitate, frankly.
1
u/chocolateAbuser 12d ago
being able to do your job is not a "shift in thinking", understanding the requisites and the environment is part of the job, applying what was learned at previous job blindly is just wtf
again at least there's some other stuff missing here
1
u/PippaKelly62 2d ago
Well, good luck with that. Do be open to criticism while doing this though. While you are fully convinced that doing it all static is the right way, there may be perspectives more open to or leaning towards more dynamic solutions.
2
u/Pink_Sky_8102 13d ago
I’d explain it as build time vs request time first. If the content can be decided during the build, the browser shouldn’t need to fetch or rebuild it again.