Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CacheValue ¶ added in v0.1.0
type CacheValue[T comparable] struct { // contains filtered or unexported fields }
func NewCacheValue ¶ added in v0.1.0
func NewCacheValue[T comparable](validity time.Duration) *CacheValue[T]
func (*CacheValue[T]) Get ¶ added in v0.1.0
func (v *CacheValue[T]) Get(origin func() (T, error)) (T, error)
func (*CacheValue[T]) GetCached ¶ added in v0.1.0
func (v *CacheValue[T]) GetCached() (T, bool)
func (*CacheValue[T]) HasValue ¶ added in v0.1.0
func (v *CacheValue[T]) HasValue() bool
func (*CacheValue[T]) Set ¶ added in v0.1.0
func (v *CacheValue[T]) Set(value T)
Click to show internal directories.
Click to hide internal directories.