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
This commit is contained in:
Bjørn Erik Pedersen
2026-01-24 14:25:34 +01:00
committed by GitHub
parent ac2c3fb20f
commit b441472b69
18 changed files with 195 additions and 69 deletions
-1
View File
@@ -122,7 +122,6 @@ jobs:
name: Test
run: |
mage -v test
go clean -i -testcache
env:
HUGO_BUILD_TAGS: extended,withdeploy
- if: matrix.os == 'ubuntu-latest'