From 00b18e8e7ea7963e67f3ca01869c35e298c00d8e Mon Sep 17 00:00:00 2001 From: Caleb Doxsey Date: Fri, 3 Nov 2023 16:14:43 -0600 Subject: [PATCH] use a smaller cache size --- authorize/evaluator/rego_compiler.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/authorize/evaluator/rego_compiler.go b/authorize/evaluator/rego_compiler.go index 37d116092..02e4d2cba 100644 --- a/authorize/evaluator/rego_compiler.go +++ b/authorize/evaluator/rego_compiler.go @@ -23,7 +23,7 @@ type RegoCompiler struct { // NewRegoCompiler creates a new RegoCompiler using the given store. func NewRegoCompiler(store *store.Store) *RegoCompiler { - policyCache := expirable.NewLRU[string, rego.PreparedEvalQuery](10_000, nil, time.Hour*24) + policyCache := expirable.NewLRU[string, rego.PreparedEvalQuery](100, nil, time.Hour*24) headersCache, err := lru.New[string, rego.PreparedEvalQuery](1) if err != nil { panic(fmt.Errorf("failed to create lru cache for headers rego scripts: %w", err))