Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions v1/runtime/runtime.go
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,9 @@ type Params struct {

// Hooks is our generic extension mechanism.
Hooks hooks.Hooks

// NDBCacheEnabled allows enabling the non-deterministic builtin cache globally.
NDBCacheEnabled bool
}

func (p *Params) regoVersion() ast.RegoVersion {
Expand Down Expand Up @@ -636,11 +639,12 @@ func (rt *Runtime) Serve(ctx context.Context) error {
WithMinTLSVersion(rt.Params.MinTLSVersion).
WithCipherSuites(rt.Params.CipherSuites).
WithDistributedTracingOpts(rt.Params.DistributedTracingOpts).
WithHooks(rt.Params.Hooks)
WithHooks(rt.Params.Hooks).
WithNDBCacheEnabled(rt.Params.NDBCacheEnabled)

// If decision_logging plugin enabled, check to see if we opted in to the ND builtins cache.
if lp := logs.Lookup(rt.Manager); lp != nil {
rt.server = rt.server.WithNDBCacheEnabled(rt.Manager.Config.NDBuiltinCacheEnabled())
rt.server = rt.server.WithNDBCacheEnabled(rt.Params.NDBCacheEnabled || rt.Manager.Config.NDBuiltinCacheEnabled())
}

if rt.Params.DiagnosticAddrs != nil {
Expand Down
Loading