cache

package
v1.2.1-celo-rc Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2024 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache

type Cache interface {
	Add(context.Context, string) error
	Remove(context.Context, string) error
	Exists(context.Context, ...string) (bool, error)
	Size(context.Context) (int64, error)
}

func New

func New(o CacheOpts) (Cache, error)

func NewMapCache

func NewMapCache() Cache

func NewRedisCache

func NewRedisCache(o redisOpts) (Cache, error)

type CacheOpts

type CacheOpts struct {
	Logg      *slog.Logger
	RedisDSN  string
	CacheType string
}

Jump to

Keyboard shortcuts

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