cache

package
v0.48.1 Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2025 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNotFound = errors.New("not found")

Functions

This section is empty.

Types

type Cache

type Cache interface {
	Set(ctx context.Context, key string, value string) error
	SetWithTTL(ctx context.Context, key string, value string, ttl time.Duration) error
	Get(ctx context.Context, key string) (string, error)
	GetTTL(ctx context.Context, key string) (time.Duration, error)
	Del(ctx context.Context, key string)
}

func NewInmemoryWithRedisOrInmemory

func NewInmemoryWithRedisOrInmemory(ctx context.Context, cfg config.Cache) (Cache, error)

func NewRedisOrInmemory

func NewRedisOrInmemory(ctx context.Context, cfg config.Cache) (Cache, error)

Directories

Path Synopsis
Package mock_cache is a generated GoMock package.
Package mock_cache is a generated GoMock package.

Jump to

Keyboard shortcuts

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