package
Version:
v1.4.0-rc.0
Opens a new window with list of versions in this module.
Published: Dec 6, 2023
License: Apache-2.0
Opens a new window with license information.
Imports: 1
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
type Cache[T any] struct {
}
func (c *Cache[T]) Get(create func() T) T
func (c *Cache[T]) Set(val T)
func (c *Cache[T]) UnsafePurge()
UnsafePurge resets cache value. The function is not goroutine safe
and shall not be used in production code
Source Files
¶
Click to show internal directories.
Click to hide internal directories.