Disabling CDN caching for active releases packages
Baptiste Jonglez
baptiste at bitsofnetworks.org
Sun Jan 11 15:32:14 PST 2026
Hi,
As discussed previously, I just disabled CDN caching for packages.
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
More information about the openwrt-adm
mailing list