Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cache ¶
type Cache[T any] struct { // contains filtered or unexported fields }
func (*Cache[T]) GetOrFetch ¶
func (*Cache[T]) Invalidate ¶ added in v1.19.2
func (c *Cache[T]) Invalidate()
type KeyedCache ¶ added in v1.19.2
type KeyedCache[K comparable, T any] struct { // contains filtered or unexported fields }
func NewKeyed ¶ added in v1.19.2
func NewKeyed[K comparable, T any]() *KeyedCache[K, T]
func (*KeyedCache[K, T]) GetOrFetch ¶ added in v1.19.2
func (*KeyedCache[K, T]) Invalidate ¶ added in v1.19.2
func (c *KeyedCache[K, T]) Invalidate(key K)
func (*KeyedCache[K, T]) InvalidateAll ¶ added in v1.19.2
func (c *KeyedCache[K, T]) InvalidateAll()
type TTL ¶ added in v1.19.1
type TTL[V any] struct { // contains filtered or unexported fields }
TTL is a concurrency-safe in-memory cache with per-entry expiration.
func (*TTL[V]) DeleteFunc ¶ added in v1.19.1
DeleteFunc removes all entries where the predicate returns true.
Click to show internal directories.
Click to hide internal directories.