Closed (fixed)
Project:
Advanced Varnish
Version:
4.0.13
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
3 Dec 2025 at 02:55 UTC
Updated:
19 Mar 2026 at 22:15 UTC
Jump to comment: Most recent
Comments
Comment #3
tostinni commentedSet to "needs review".
Comment #4
rushikesh raval commentedI have reviewed MR!25. It fixes issue as per summary.
I am moving it to RTBC+.
Comment #5
rushikesh raval commentedComment #7
shumer commentedThe original patch applies
Cache-Control: public, max-age=31536000, immutableto all static files equally. This works great for cache-busted assets (CSS/JS with query strings like?v=abc123), but is riskyfor files without cache busting - e.g. uploaded images at
/sites/default/files/photo.jpg. If someone replaces a file at the same URL, browsers will serve the stale version for up to a year without even attempting revalidation(
immutableprevents conditional requests).What changed
The VCL now uses three tiers of caching:
X-TTLheader (e.g. via nginx config), Varnish uses that value. This gives site owners a way to control static file TTL without editing VCL.?) - 1 year +immutable. Safe because the query string changes when the file changes.immutable. A reasonable default that still scores well on PageSpeed but doesn't lock in stale content for a year.Comment #8
shumer commented