Fix caching

This commit is contained in:
ferreo 2024-08-31 16:25:22 +01:00
parent 64fa81f620
commit 20228de56a

View File

@ -11,6 +11,7 @@ import (
"log/slog"
"net/http"
"slices"
"strconv"
"strings"
"sync"
"time"
@ -294,7 +295,7 @@ func ProcessStalePackages(internalPackages *haxmap.Map[string, domain.SourcePack
}
func fetchPackageFile(pkg config.PackageFile, selectedRepo string) (*haxmap.Map[string, domain.PackageInfo], error) {
resp, err := http.Get(pkg.Url + selectedRepo + "/" + pkg.Packagepath + "." + pkg.Compression)
resp, err := http.Get(pkg.Url + selectedRepo + "/" + pkg.Packagepath + "." + pkg.Compression + "?nocache=" + strconv.Itoa(int(time.Now().Unix())))
if err != nil {
return nil, fmt.Errorf("fetching package file: %w", err)
}