Documentation
¶
Overview ¶
Package null provides a no-op store implementation for sfcache. All gets return not found, all sets are discarded. Useful for testing or when the TieredCache API is desired without persistence.
Index ¶
- type Store
- func (*Store[K, V]) Cleanup(_ context.Context, _ time.Duration) (int, error)
- func (*Store[K, V]) Close() error
- func (*Store[K, V]) Delete(_ context.Context, _ K) error
- func (*Store[K, V]) Flush(_ context.Context) (int, error)
- func (*Store[K, V]) Get(_ context.Context, _ K) (value V, expiry time.Time, found bool, err error)
- func (*Store[K, V]) Len(_ context.Context) (int, error)
- func (*Store[K, V]) Location(_ K) string
- func (*Store[K, V]) Set(_ context.Context, _ K, _ V, _ time.Time) error
- func (*Store[K, V]) ValidateKey(_ K) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Store ¶
type Store[K comparable, V any] struct{}
Store implements a no-op persistence store. It satisfies the sfcache.Store interface without storing anything.
func (*Store[K, V]) ValidateKey ¶
ValidateKey always returns nil (all keys are valid).
Click to show internal directories.
Click to hide internal directories.