Skip to content
This repository was archived by the owner on Jan 24, 2025. It is now read-only.

Commit 0994a7d

Browse files
committed
Increase the maximum size of cache
1 parent 9cf7b38 commit 0994a7d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

components/restapi/params.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ type ParametersRestAPI struct {
1717
// MaxPageSize defines the maximum number of results per page.
1818
MaxPageSize uint32 `default:"100" usage:"the maximum number of results per page"`
1919
// MaxCacheSize defines the maximum size of cache for results.
20-
MaxCacheSize string `default:"2MB" usage:"the maximum size of cache for results"`
20+
MaxCacheSize string `default:"50MB" usage:"the maximum size of cache for results"`
2121

2222
JWTAuth struct {
2323
// salt used inside the JWT tokens for the REST API. Change this to a different value to invalidate JWT tokens not matching this new value

pkg/requesthandler/requesthandler.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ func New(p *protocol.Protocol, opts ...options.Option[RequestHandler]) *RequestH
2121
return options.Apply(&RequestHandler{
2222
workerPool: p.Workers.CreatePool("BlockHandler"),
2323
protocol: p,
24-
optsCacheMaxSize: 2 << 20, // 2MB
24+
optsCacheMaxSize: 50 << 20, // 50MB
2525
}, opts, func(r *RequestHandler) {
2626
r.cache = cache.NewCache(r.optsCacheMaxSize)
2727
})

0 commit comments

Comments
 (0)