]> git.maquefel.me Git - brevno-suite/hugo/commit
Add modulequeries file cache for module version queries
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Sat, 24 Jan 2026 13:25:34 +0000 (14:25 +0100)
committerGitHub <noreply@github.com>
Sat, 24 Jan 2026 13:25:34 +0000 (14:25 +0100)
commitb441472b6907079ac58baa9b7c79f5d7ac7ce31c
tree2c73d80160bd10dcdeaa44ebe698278946ae660d
parentac2c3fb20fcd6ea517ccc74daacb87622e7b3a35
Add modulequeries file cache for module version queries

This adds a new file cache named 'modulequeries' with a 24h maxAge
that caches JSON responses from 'go mod download -json' when querying
module versions with constraints (e.g., version = "<v3.0.0").

On subsequent builds, if the cached JSON exists and the module
directory it references is non-empty, the cached result is used
directly, skipping the costly VCS interaction entirely.

Fixes #14417
18 files changed:
.github/workflows/test.yml
.gitignore
cache/filecache/filecache.go
cache/filecache/filecache_config.go
cache/filecache/filecache_config_test.go
cache/filecache/filecache_pruner_test.go
cache/filecache/filecache_test.go
common/hashing/hashing.go
config/allconfig/allconfig.go
config/allconfig/configlanguage.go
config/allconfig/load.go
config/configProvider.go
deps/deps.go
magefile.go
modules/client.go
modules/collect.go
resources/resource_cache.go
resources/resource_transformers/babel/babel_integration_test.go