Disabling CDN caching for active releases packages

Etienne Champetier champetier.etienne at gmail.com
Tue Jan 20 10:11:28 PST 2026


Le mar. 20 janv. 2026 à 12:46, Etienne Champetier
<champetier.etienne at gmail.com> a écrit :
>
> Le dim. 18 janv. 2026 à 19:15, Baptiste Jonglez
> <baptiste at bitsofnetworks.org> a écrit :
> >
> > On 14-01-26, Etienne Champetier wrote:
> > > Hi Baptiste,
> > >
> > > Le dim. 11 janv. 2026 à 18:33, Baptiste Jonglez
> > > <baptiste at bitsofnetworks.org> a écrit :
> > > >
> > > > Hi,
> > > >
> > > > As discussed previously, I just disabled CDN caching for packages.
> > >
> > > Maybe that's already what you are doing, but instead of fully disabling caching,
> > > can you always revalidate ? I think you just need to use
> > > 'Cache-Control: no-cache' on the origin server
> >
> > We are not currently setting any cache header on the origin server.
> >
> > Just to understand, with your proposal, the CDN would check the origin
> > server for each hit, but it would still serve from its cache if it detects
> > that the file is up-to-date?
>
> Yes, that's the goal
>
> > Does it need other special headers, for instance to get the last update
> > time for a file or even a checksum?
>
> On the origin you need either Etag (best) of Last-Modified header,
> then on varnish side you need to set a really small TTL (or even 0)
> and tell it to keep stale objects
> This blog post seems pretty good to me
> https://info.varnish-software.com/blog/systematic-content-validation-with-varnish

Actually you might be able to configure everything on the origin:
https://www.varnish-software.com/developers/tutorials/http-caching-basics/#cache-revalidation-flow

Cache-Control: public, s-maxage=3600, stale-while-revalidate=60


>
> >
> > Baptiste



More information about the openwrt-adm mailing list