Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CalculateFunc ¶
type CalculateFunc[Key comparable, Value any] func(key Key) Value
type ComputationCache ¶
type ComputationCache[Key comparable, Value any] struct { Calculate CalculateFunc[Key, Value] Data map[Key]Value }
func NewComputationCache ¶
func NewComputationCache[Key comparable, Value any](f CalculateFunc[Key, Value]) *ComputationCache[Key, Value]
func (*ComputationCache[Key, Value]) Get ¶
func (c *ComputationCache[Key, Value]) Get(key Key) Value
Click to show internal directories.
Click to hide internal directories.