cache

package
v0.0.0-...-04c4af4 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 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 Cache

type Cache struct {
	providers.AbstractProvider

	Opts *Options
	// contains filtered or unexported fields
}

func New

func New(opts ...Option) *Cache

func (*Cache) Close

func (p *Cache) Close() error

func (*Cache) Get

func (p *Cache) Get(key string) ([]byte, error)

func (*Cache) Init

func (p *Cache) Init() error

func (*Cache) Set

func (p *Cache) Set(key string, value []byte) error

type Option

type Option func(*Options)

func WithCleanWindow

func WithCleanWindow(dur time.Duration) Option

func WithConfig

func WithConfig(config bigcache.Config) Option

func WithContext

func WithContext(ctx context.Context) Option

func WithLifeWindow

func WithLifeWindow(dur time.Duration) Option

type Options

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

func (*Options) MergeIn

func (o *Options) MergeIn(opts ...Option)

Jump to

Keyboard shortcuts

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