1
0
Fork 0
mirror of https://codeberg.org/Codeberg/pages-server.git synced 2025-08-13 19:10:54 +00:00

create a workaround to fix the oom problem

This commit is contained in:
crapStone 2024-02-05 19:16:35 +01:00 committed by crapStone
parent dd6d8bd60f
commit a9b6615286
3 changed files with 63 additions and 2 deletions

View file

@ -79,7 +79,7 @@ func Serve(ctx *cli.Context) error {
// redirectsCache stores redirects in _redirects files
redirectsCache := cache.NewInMemoryCache()
// clientResponseCache stores responses from the Gitea server
clientResponseCache := cache.NewInMemoryCache()
clientResponseCache := cache.NewInMemoryCacheWithLimit(ctx.Uint64("memory-limit"))
giteaClient, err := gitea.NewClient(cfg.Gitea, clientResponseCache)
if err != nil {