Fixed asset names with long cache lifetimes: Old logo still shows a day after the rebrand
Fixed asset names with long cache lifetimes debugging lab. New CSS and a new logo shipped yesterday. Half of users still see the old ones, and some see a broken mix of new HTML with old CSS.
Practice debugging a fixed asset names with long cache lifetimes in a live, broken production system in your browser, with Go. Find the root cause in the logs, terminal and code, fix it, and a load test checks that the fix holds under real traffic.
1. The Incident Context
New CSS and a new logo shipped yesterday. Half of users still see the old ones, and some see a broken mix of new HTML with old CSS. Nobody can figure out why the "deploy" didn't stick.
2. Observed Symptoms & Metrics
- Affected Endpoints / Components:
GET /, the stylesheet, the CDN edge cache, the browser cache.
- Behavior: The HTML and the assets use fixed names and a one-year
Cache-Control. After a deploy the URL is the same, so the CDN and browsers keep serving the old file for up to a year.
- Error Rate: Zero. This is a caching problem, not a correctness problem.
- System Metrics: The CDN hit rate is high — too high. It keeps serving the old asset.
3. Application Logs
13:01:02 origin listening on :8080
13:02:10 GET / 200 (Cache-Control: public, max-age=31536000)
13:02:11 GET /static/app.css 200 (Cache-Control: public, max-age=31536000)
4. Your Objective
Step into the live environment while synthetic traffic is running, diagnose the root cause, and patch the codebase.
To clear this stack, your fix must satisfy these automated verification checks:
- Freshness: Right after a deploy, a client through the CDN gets the new stylesheet.
- Caching: The stylesheet is still served from the CDN cache (hit rate stays above 90%).
Toolbox: curl -i localhost:8080/, curl -X POST localhost:8081/deploy, curl -i localhost:8081/static/app.css, curl localhost:8081/stats.
Put a content hash in each asset name, keep the long cache on hashed files, and give HTML a short cache. A new deploy means new file names, so nothing has to be purged.
Save a file in the editor to rebuild and restart the app. Click Verify when you think it's fixed.
Your account and data
You can browse stacks without an account. To run labs you sign in with your email or Google account. BustedStack uses your email address to
sign you in, and your name and profile picture to show your account and pre-fill certificates. We never access your Gmail, contacts or Drive,
sell your data or run ad trackers.
Privacy Policy · Terms of Service · Browse stacks ·
hello@bustedstack.com
This site needs JavaScript to run labs.