Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SingleflightCache ¶
type SingleflightCache[T comparable] struct { // contains filtered or unexported fields }
func NewSingleflightCache ¶
func NewSingleflightCache[T comparable]() *SingleflightCache[T]
func (*SingleflightCache[T]) Do ¶
func (c *SingleflightCache[T]) Do(key string, fn func() (T, error)) (T, error)
func (*SingleflightCache[T]) ForgetCacheKey ¶
func (c *SingleflightCache[T]) ForgetCacheKey(key string)
func (*SingleflightCache[T]) OverwriteCacheKey ¶
func (c *SingleflightCache[T]) OverwriteCacheKey(key string, val T)
Click to show internal directories.
Click to hide internal directories.