memory

package
v0.0.0-...-643495d Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MemoryStore

type MemoryStore struct {
	// contains filtered or unexported fields
}

func NewStore

func NewStore(opts ...StoreOption) *MemoryStore

func (*MemoryStore) Clear

func (s *MemoryStore) Clear(_ context.Context) error

func (*MemoryStore) Close

func (s *MemoryStore) Close() error

func (*MemoryStore) Delete

func (s *MemoryStore) Delete(_ context.Context, key string) error

func (*MemoryStore) DeleteMany

func (s *MemoryStore) DeleteMany(ctx context.Context, keys []string) error

func (*MemoryStore) Get

func (s *MemoryStore) Get(_ context.Context, key string) (any, error)

func (*MemoryStore) GetMany

func (s *MemoryStore) GetMany(ctx context.Context, keys []string) (map[string]any, error)

func (*MemoryStore) Set

func (s *MemoryStore) Set(_ context.Context, key string, value any, opts ...xcache.Option) error

type StoreOption

type StoreOption func(*StoreOptions)

func WithShards

func WithShards(n uint64) StoreOption

func WithSweepInterval

func WithSweepInterval(d time.Duration) StoreOption

type StoreOptions

type StoreOptions struct {
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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