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

use /proc/self/statm to get current usage

This commit is contained in:
crapStone 2024-03-15 20:35:39 +01:00
parent a9b6615286
commit bb41a4abfa
3 changed files with 35 additions and 13 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.NewInMemoryCacheWithLimit(ctx.Uint64("memory-limit"))
clientResponseCache := cache.NewInMemoryCacheWithLimit(ctx.Int("memory-limit"))
giteaClient, err := gitea.NewClient(cfg.Gitea, clientResponseCache)
if err != nil {