Disabling CDN caching for active releases packages

Etienne Champetier champetier.etienne at gmail.com
Wed Jan 14 10:48:35 PST 2026


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

> This should help with the consistency issues arising when package indexes
> and actual packages were cached at different times, leading to checksum
> errors on clients (Imagebuilder or actual devices).
>
> I did notice a small amount of HTTP 501 errors appearing since the config
> change, but I don't understand why.  In my tests, package updates work
> fine.  If you encounter errors, let me know.
>
> An alternative fix would be to purge the cache when packages are rebuilt,
> but this is actually quite hard to do reliably.  If the simple solution
> (cache bypass) works and doesn't generate too much load, it should be
> easier to maintain in the long-term.
>
> We still cache image downloads, and we cache everything for older releases
> (23.05 and older) since we already stopped rebuilding their packages.
>
> For the curious, here is the regexp that triggers the cache bypass:
>
>   req.url ~ "^/(snapshots|releases/(24\.10|25\.12)[a-zA-Z0-9_\-\.]*/packages|releases/packages-(24\.10|25\.12))/.*[^/]\z"
>
> Baptiste
>
> _______________________________________________
> openwrt-adm mailing list
> openwrt-adm at lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-adm



More information about the openwrt-adm mailing list