noopcache

package
v0.12.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 23, 2025 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New[V any]() cachestore.Store[V]

func NewBackend added in v0.12.1

func NewBackend() cachestore.Backend

Types

type NoopCache

type NoopCache[V any] struct{}

func (*NoopCache[V]) BatchGet

func (s *NoopCache[V]) BatchGet(ctx context.Context, keys []string) ([]V, []bool, error)

func (*NoopCache[V]) BatchSet

func (s *NoopCache[V]) BatchSet(ctx context.Context, keys []string, values []V) error

func (*NoopCache[V]) BatchSetEx

func (s *NoopCache[V]) BatchSetEx(ctx context.Context, keys []string, values []V, ttl time.Duration) error

func (*NoopCache[V]) ClearAll

func (s *NoopCache[V]) ClearAll(ctx context.Context) error

func (*NoopCache[V]) Delete

func (s *NoopCache[V]) Delete(ctx context.Context, key string) error

func (*NoopCache[V]) DeletePrefix

func (s *NoopCache[V]) DeletePrefix(ctx context.Context, keyPrefix string) error

func (*NoopCache[V]) Exists

func (s *NoopCache[V]) Exists(ctx context.Context, key string) (bool, error)

func (*NoopCache[V]) Get

func (s *NoopCache[V]) Get(ctx context.Context, key string) (V, bool, error)

func (*NoopCache[V]) GetOrSetWithLock

func (s *NoopCache[V]) GetOrSetWithLock(ctx context.Context, key string, getter func(context.Context, string) (V, error)) (V, error)

func (*NoopCache[V]) GetOrSetWithLockEx

func (s *NoopCache[V]) GetOrSetWithLockEx(ctx context.Context, key string, getter func(context.Context, string) (V, error), ttl time.Duration) (V, error)

func (*NoopCache[V]) Name

func (s *NoopCache[V]) Name() string

func (*NoopCache[V]) Options

func (s *NoopCache[V]) Options() cachestore.StoreOptions

func (*NoopCache[V]) Set

func (s *NoopCache[V]) Set(ctx context.Context, key string, value V) error

func (*NoopCache[V]) SetEx

func (s *NoopCache[V]) SetEx(ctx context.Context, key string, value V, ttl time.Duration) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL