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 ¶
func (c *Cache[T]) Invalidate()
type KeyedCache ¶
type KeyedCache[K comparable, T any] struct { // contains filtered or unexported fields }
func NewKeyed ¶
func NewKeyed[K comparable, T any]() *KeyedCache[K, T]
func (*KeyedCache[K, T]) GetOrFetch ¶
func (*KeyedCache[K, T]) Invalidate ¶
func (c *KeyedCache[K, T]) Invalidate(key K)
func (*KeyedCache[K, T]) InvalidateAll ¶
func (c *KeyedCache[K, T]) InvalidateAll()
type StaleError ¶
type StaleError struct {
Err error
}
func (*StaleError) Error ¶
func (e *StaleError) Error() string
func (*StaleError) Unwrap ¶
func (e *StaleError) Unwrap() error
type TTL ¶
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 ¶
DeleteFunc removes all entries where the predicate returns true.
Click to show internal directories.
Click to hide internal directories.