cache

package
v0.3.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 18, 2025 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CelFunction

type CelFunction func(...ref.Val) ref.Val

type FunctionCache

type FunctionCache struct {
	// contains filtered or unexported fields
}

func NewFunctionCache

func NewFunctionCache(config FunctionCacheConfig) *FunctionCache

func (*FunctionCache) ClearCache

func (fc *FunctionCache) ClearCache()

func (*FunctionCache) GetCacheStats

func (fc *FunctionCache) GetCacheStats() (size int)

func (*FunctionCache) WithCache

func (fc *FunctionCache) WithCache(fn CelFunction, functionName string) CelFunction

type FunctionCacheConfig

type FunctionCacheConfig struct {
	MaxSize int           `mapstructure:"maxSize"`
	TTL     time.Duration `mapstructure:"ttl"`
}

func DefaultFunctionCacheConfig

func DefaultFunctionCacheConfig() FunctionCacheConfig

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL